Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing spans in case of multi library auto-instrumented project #832

Closed
mat-rumian opened this issue Jun 16, 2020 · 7 comments · Fixed by #852
Closed

Missing spans in case of multi library auto-instrumented project #832

mat-rumian opened this issue Jun 16, 2020 · 7 comments · Fixed by #852
Assignees
Labels
bug Something isn't working

Comments

@mat-rumian
Copy link

Environment

Application:

argparse = "1.4.0"
opentelemetry-instrumentation = "0.9b0"
opentelemetry-api = "0.9b0"
opentelemetry-sdk = "0.9b0"
opentelemetry-ext-requests = "0.9b0"
opentelemetry-ext-psycopg2 = "0.9b0"
opentelemetry-ext-flask = "0.9b0"
opentelemetry-ext-jaeger = "0.9b0"
psycopg2-binary = "2.8.5"
pyjson = "1.3.0"
pyyaml = "5.3.1"
requests = "2.23.0"

Collector
Jaeger All In One = 1.18

Application design

Simple test application called Italian Coffee Bar

  • client - The Coffee Lover
  • 3 http_servers - The Coffee Bar, The Coffee Machine and The Cashdesk
  • PostgresDB (v9.6.2)

The Coffee Lover - client, requests lib, manually instrumented by opentelemetry.ext.requests.RequestsInstrumentor().instrument()

The Coffee Bar - libs: flask, requests, instrumented by opentelemetry-instrument
The Coffee Machine - libs: flask, instrumented by opentelemetry-instrument
The Cashdesk - libs: flask, psycopg2, instrumented by opentelemetry-instrument

Spans exported by:

  • Jaeger span exporter in batch processor
  • Console Exporter

Flow

  1. coffee_lover by requests.post calling for espresso to coffee_bar Flask server.
  2. coffee_bar by requsts.post calling for coffee preparation to coffee_machine Flask server
  3. coffee_bar by requests.post calling for payment process to cashdesk Flask server
  4. cashdesk by psycopg2 is connecting to PosgresDB and performing update

What is the actual behavior?
image

What is the expected behavior?
Few spans are missing:

  • coffee_bar response to coffee_lover client - Flow point 1
  • coffee_machine response to coffee_bar - Flow point 2.
  • cashdesk response to coffee_bar - Flow point 3.
  • cashdesk connection and query to PostgresDB - Flow point 4.

Additional context

Click to expand spans { "data": [ { "traceID": "8523d69752962fe2c4717dae292e10f0", "spans": [ { "traceID": "8523d69752962fe2c4717dae292e10f0", "spanID": "cbdddda6d3c3acdb", "flags": 1, "operationName": "/do_espresso", "references": [], "startTime": 1592338788433391, "duration": 670280, "tags": [ { "key": "component", "type": "string", "value": "http" }, { "key": "http.method", "type": "string", "value": "POST" }, { "key": "http.url", "type": "string", "value": "http://the-coffee-bar:8082/do_espresso" }, { "key": "http.status_code", "type": "int64", "value": 200 }, { "key": "http.status_text", "type": "string", "value": "OK" }, { "key": "status.code", "type": "int64", "value": 0 }, { "key": "status.message", "type": "string", "value": "" }, { "key": "span.kind", "type": "string", "value": "CLIENT" }, { "key": "internal.span.format", "type": "string", "value": "proto" } ], "logs": [], "processID": "p1", "warnings": null }, { "traceID": "8523d69752962fe2c4717dae292e10f0", "spanID": "728b24849677fcdc", "flags": 1, "operationName": "espresso", "references": [ { "refType": "CHILD_OF", "traceID": "8523d69752962fe2c4717dae292e10f0", "spanID": "bf42c2b0caffd314" } ], "startTime": 1592338788440244, "duration": 634381, "tags": [ { "key": "component", "type": "string", "value": "http" }, { "key": "http.method", "type": "string", "value": "POST" }, { "key": "http.server_name", "type": "string", "value": "172.27.0.2" }, { "key": "http.scheme", "type": "string", "value": "http" }, { "key": "host.port", "type": "int64", "value": 8083 }, { "key": "http.host", "type": "string", "value": "the-coffee-machine:8083" }, { "key": "http.target", "type": "string", "value": "/espresso" }, { "key": "net.peer.ip", "type": "string", "value": "172.27.0.6" }, { "key": "net.peer.port", "type": "int64", "value": 52242 }, { "key": "http.flavor", "type": "string", "value": "1.1" }, { "key": "http.route", "type": "string", "value": "/espresso" }, { "key": "http.status_text", "type": "string", "value": "OK" }, { "key": "http.status_code", "type": "int64", "value": 200 }, { "key": "status.code", "type": "int64", "value": 0 }, { "key": "status.message", "type": "string", "value": "" }, { "key": "span.kind", "type": "string", "value": "SERVER" }, { "key": "internal.span.format", "type": "string", "value": "proto" } ], "logs": [], "processID": "p2", "warnings": null }, { "traceID": "8523d69752962fe2c4717dae292e10f0", "spanID": "9f320d4130e1cf77", "flags": 1, "operationName": "pay_in", "references": [ { "refType": "CHILD_OF", "traceID": "8523d69752962fe2c4717dae292e10f0", "spanID": "bf42c2b0caffd314" } ], "startTime": 1592338789080193, "duration": 18823, "tags": [ { "key": "component", "type": "string", "value": "http" }, { "key": "http.method", "type": "string", "value": "POST" }, { "key": "http.server_name", "type": "string", "value": "172.27.0.3" }, { "key": "http.scheme", "type": "string", "value": "http" }, { "key": "host.port", "type": "int64", "value": 8084 }, { "key": "http.host", "type": "string", "value": "the-cashdesk:8084" }, { "key": "http.target", "type": "string", "value": "/pay_in" }, { "key": "net.peer.ip", "type": "string", "value": "172.27.0.6" }, { "key": "net.peer.port", "type": "int64", "value": 46638 }, { "key": "http.flavor", "type": "string", "value": "1.1" }, { "key": "http.route", "type": "string", "value": "/pay_in" }, { "key": "http.status_text", "type": "string", "value": "OK" }, { "key": "http.status_code", "type": "int64", "value": 200 }, { "key": "status.code", "type": "int64", "value": 0 }, { "key": "status.message", "type": "string", "value": "" }, { "key": "span.kind", "type": "string", "value": "SERVER" }, { "key": "internal.span.format", "type": "string", "value": "proto" } ], "logs": [], "processID": "p3", "warnings": null }, { "traceID": "8523d69752962fe2c4717dae292e10f0", "spanID": "bf42c2b0caffd314", "flags": 1, "operationName": "do_espresso", "references": [ { "refType": "CHILD_OF", "traceID": "8523d69752962fe2c4717dae292e10f0", "spanID": "cbdddda6d3c3acdb" } ], "startTime": 1592338788436629, "duration": 664572, "tags": [ { "key": "component", "type": "string", "value": "http" }, { "key": "http.method", "type": "string", "value": "POST" }, { "key": "http.server_name", "type": "string", "value": "172.27.0.6" }, { "key": "http.scheme", "type": "string", "value": "http" }, { "key": "host.port", "type": "int64", "value": 8082 }, { "key": "http.host", "type": "string", "value": "the-coffee-bar:8082" }, { "key": "http.target", "type": "string", "value": "/do_espresso" }, { "key": "net.peer.ip", "type": "string", "value": "172.27.0.5" }, { "key": "net.peer.port", "type": "int64", "value": 36390 }, { "key": "http.flavor", "type": "string", "value": "1.1" }, { "key": "http.route", "type": "string", "value": "/do_espresso" }, { "key": "http.status_text", "type": "string", "value": "OK" }, { "key": "http.status_code", "type": "int64", "value": 200 }, { "key": "status.code", "type": "int64", "value": 0 }, { "key": "status.message", "type": "string", "value": "" }, { "key": "span.kind", "type": "string", "value": "SERVER" }, { "key": "internal.span.format", "type": "string", "value": "proto" } ], "logs": [], "processID": "p4", "warnings": null } ], "processes": { "p1": { "serviceName": "the-coffee-lover", "tags": [] }, "p2": { "serviceName": "the-coffee-machine", "tags": [] }, "p3": { "serviceName": "the-cashdesk", "tags": [] }, "p4": { "serviceName": "the-coffee-bar", "tags": [] } }, "warnings": null } ], "total": 0, "limit": 0, "offset": 0, "errors": null }
@mat-rumian mat-rumian added the bug Something isn't working label Jun 16, 2020
@ocelotl ocelotl self-assigned this Jun 16, 2020
@lzchen
Copy link
Contributor

lzchen commented Jun 16, 2020

For the spans that you believe are missing:

  1. coffee_bar response to coffee_lover client - Flow point 1

  2. coffee_machine response to coffee_bar - Flow point 2.

  3. cashdesk response to coffee_bar - Flow point 3.
    I'm confused for the above three. Aren't these present in the diagram?

  4. cashdesk connection and query to PostgresDB - Flow point 4.
    This is actually missing, there should be a span which is a Client span and is a child of the-cashdesk

@mat-rumian
Copy link
Author

@lzchen I made a mistake in description, I'm sorry.
Flow 1. coffee_lover to coffee_bar is complete - there're spanKind.CLIENT and spanKind.SERVER

Missing spans

  • Flow 2. is not complete, missing spanKind.CLIENT which should be generated by coffee_bar POST request to coffee_machine. (spanKind.SERVER is present, and generated by coffee_machine)
  • Flow 3. same as flow 2, missing spanKind.CLIENT which should be generated by coffee_bar POST request to cashdesk. (spanKind.SERVER is present, and generated by cashdesk)
  • Flow 4. cashdesk - missing spanKind.CLIENT to PostgresDB

IMHO it looks like the instrumentation only generates spans for the library which was encountered as first.
Please load in the jaeger attached spans, and it will be easier to understand what's missing.

@ocelotl
Copy link
Contributor

ocelotl commented Jun 19, 2020

Hello @mat-rumian

I am trying to reproduce your issue. I may have found something similar to what has happened to you. Can you please share the complete code of your application (if possible to you)?

@mat-rumian
Copy link
Author

Hi @ocelotl
Please take a look @ https://github.com/mat-rumian/the-coffee-bar-app
You will find there complete code of the application. Please let me know if you will need some help :)

@ocelotl
Copy link
Contributor

ocelotl commented Jun 19, 2020

Hi @ocelotl
Please take a look @ https://github.com/mat-rumian/the-coffee-bar-app
You will find there complete code of the application. Please let me know if you will need some help :)

Perfect, thanks!

@ocelotl
Copy link
Contributor

ocelotl commented Jun 24, 2020

Ok, here it is: #852

This was a very tricky issue because the root cause was hidden in closures in the instrumentors. Please give it a try with these changes, @mat-rumian and also run this in all consoles before running any of the scripts that make up this example:

export OPENTELEMETRY_PYTHON_TRACER_PROVIDER=sdk_tracer_provider

Screenshot from 2020-06-23 23-35-21

{
    "data": [
        {
            "traceID": "771d70ff86fe03a66d7d97c221836cdf",
            "spans": [
                {
                    "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                    "spanID": "ccacbd04ecaafd7a",
                    "flags": 1,
                    "operationName": "postgresql.account",
                    "references": [
                        {
                            "refType": "CHILD_OF",
                            "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                            "spanID": "f1c79533d108b518"
                        }
                    ],
                    "startTime": 1592969641809192,
                    "duration": 5071,
                    "tags": [
                        {
                            "key": "component",
                            "type": "string",
                            "value": "postgresql"
                        },
                        {
                            "key": "db.type",
                            "type": "string",
                            "value": "sql"
                        },
                        {
                            "key": "db.instance",
                            "type": "string",
                            "value": "account"
                        },
                        {
                            "key": "db.statement",
                            "type": "string",
                            "value": "SELECT product, items_sold FROM account WHERE product = 'espresso'"
                        },
                        {
                            "key": "db.user",
                            "type": "string",
                            "value": "account"
                        },
                        {
                            "key": "net.peer.name",
                            "type": "string",
                            "value": "localhost"
                        },
                        {
                            "key": "net.peer.port",
                            "type": "int64",
                            "value": 5432
                        },
                        {
                            "key": "status.code",
                            "type": "int64",
                            "value": 0
                        },
                        {
                            "key": "status.message",
                            "type": "string",
                            "value": ""
                        },
                        {
                            "key": "span.kind",
                            "type": "string",
                            "value": "CLIENT"
                        },
                        {
                            "key": "internal.span.format",
                            "type": "string",
                            "value": "proto"
                        }
                    ],
                    "logs": [],
                    "processID": "p1",
                    "warnings": null
                },
                {
                    "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                    "spanID": "f1c79533d108b518",
                    "flags": 1,
                    "operationName": "pay_in",
                    "references": [
                        {
                            "refType": "CHILD_OF",
                            "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                            "spanID": "d362dff07011a56f"
                        }
                    ],
                    "startTime": 1592969641766514,
                    "duration": 79572,
                    "tags": [
                        {
                            "key": "component",
                            "type": "string",
                            "value": "http"
                        },
                        {
                            "key": "http.method",
                            "type": "string",
                            "value": "POST"
                        },
                        {
                            "key": "http.server_name",
                            "type": "string",
                            "value": "127.0.0.1"
                        },
                        {
                            "key": "http.scheme",
                            "type": "string",
                            "value": "http"
                        },
                        {
                            "key": "host.port",
                            "type": "int64",
                            "value": 8084
                        },
                        {
                            "key": "http.host",
                            "type": "string",
                            "value": "localhost:8084"
                        },
                        {
                            "key": "http.target",
                            "type": "string",
                            "value": "/pay_in"
                        },
                        {
                            "key": "net.peer.ip",
                            "type": "string",
                            "value": "127.0.0.1"
                        },
                        {
                            "key": "net.peer.port",
                            "type": "int64",
                            "value": 35636
                        },
                        {
                            "key": "http.flavor",
                            "type": "string",
                            "value": "1.1"
                        },
                        {
                            "key": "http.route",
                            "type": "string",
                            "value": "/pay_in"
                        },
                        {
                            "key": "http.status_text",
                            "type": "string",
                            "value": "OK"
                        },
                        {
                            "key": "http.status_code",
                            "type": "int64",
                            "value": 200
                        },
                        {
                            "key": "status.code",
                            "type": "int64",
                            "value": 0
                        },
                        {
                            "key": "status.message",
                            "type": "string",
                            "value": ""
                        },
                        {
                            "key": "span.kind",
                            "type": "string",
                            "value": "SERVER"
                        },
                        {
                            "key": "internal.span.format",
                            "type": "string",
                            "value": "proto"
                        }
                    ],
                    "logs": [],
                    "processID": "p1",
                    "warnings": null
                },
                {
                    "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                    "spanID": "db60d891bf23662c",
                    "flags": 1,
                    "operationName": "postgresql.account",
                    "references": [
                        {
                            "refType": "CHILD_OF",
                            "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                            "spanID": "f1c79533d108b518"
                        }
                    ],
                    "startTime": 1592969641786570,
                    "duration": 4131,
                    "tags": [
                        {
                            "key": "component",
                            "type": "string",
                            "value": "postgresql"
                        },
                        {
                            "key": "db.type",
                            "type": "string",
                            "value": "sql"
                        },
                        {
                            "key": "db.instance",
                            "type": "string",
                            "value": "account"
                        },
                        {
                            "key": "db.statement",
                            "type": "string",
                            "value": "SELECT product, price FROM account WHERE product = 'espresso'"
                        },
                        {
                            "key": "db.user",
                            "type": "string",
                            "value": "account"
                        },
                        {
                            "key": "net.peer.name",
                            "type": "string",
                            "value": "localhost"
                        },
                        {
                            "key": "net.peer.port",
                            "type": "int64",
                            "value": 5432
                        },
                        {
                            "key": "status.code",
                            "type": "int64",
                            "value": 0
                        },
                        {
                            "key": "status.message",
                            "type": "string",
                            "value": ""
                        },
                        {
                            "key": "span.kind",
                            "type": "string",
                            "value": "CLIENT"
                        },
                        {
                            "key": "internal.span.format",
                            "type": "string",
                            "value": "proto"
                        }
                    ],
                    "logs": [],
                    "processID": "p1",
                    "warnings": null
                },
                {
                    "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                    "spanID": "523b98d89568f29f",
                    "flags": 1,
                    "operationName": "postgresql.account",
                    "references": [
                        {
                            "refType": "CHILD_OF",
                            "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                            "spanID": "f1c79533d108b518"
                        }
                    ],
                    "startTime": 1592969641833905,
                    "duration": 4260,
                    "tags": [
                        {
                            "key": "component",
                            "type": "string",
                            "value": "postgresql"
                        },
                        {
                            "key": "db.type",
                            "type": "string",
                            "value": "sql"
                        },
                        {
                            "key": "db.instance",
                            "type": "string",
                            "value": "account"
                        },
                        {
                            "key": "db.statement",
                            "type": "string",
                            "value": "UPDATE account SET items_sold = %s WHERE product = %s"
                        },
                        {
                            "key": "db.user",
                            "type": "string",
                            "value": "account"
                        },
                        {
                            "key": "net.peer.name",
                            "type": "string",
                            "value": "localhost"
                        },
                        {
                            "key": "net.peer.port",
                            "type": "int64",
                            "value": 5432
                        },
                        {
                            "key": "status.code",
                            "type": "int64",
                            "value": 0
                        },
                        {
                            "key": "status.message",
                            "type": "string",
                            "value": ""
                        },
                        {
                            "key": "span.kind",
                            "type": "string",
                            "value": "CLIENT"
                        },
                        {
                            "key": "internal.span.format",
                            "type": "string",
                            "value": "proto"
                        }
                    ],
                    "logs": [],
                    "processID": "p1",
                    "warnings": null
                },
                {
                    "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                    "spanID": "d362dff07011a56f",
                    "flags": 1,
                    "operationName": "/pay_in",
                    "references": [
                        {
                            "refType": "CHILD_OF",
                            "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                            "spanID": "c3eba4eae4a758b3"
                        }
                    ],
                    "startTime": 1592969641758087,
                    "duration": 90405,
                    "tags": [
                        {
                            "key": "component",
                            "type": "string",
                            "value": "http"
                        },
                        {
                            "key": "http.method",
                            "type": "string",
                            "value": "POST"
                        },
                        {
                            "key": "http.url",
                            "type": "string",
                            "value": "http://localhost:8084/pay_in"
                        },
                        {
                            "key": "http.status_code",
                            "type": "int64",
                            "value": 200
                        },
                        {
                            "key": "http.status_text",
                            "type": "string",
                            "value": "OK"
                        },
                        {
                            "key": "status.code",
                            "type": "int64",
                            "value": 0
                        },
                        {
                            "key": "status.message",
                            "type": "string",
                            "value": ""
                        },
                        {
                            "key": "span.kind",
                            "type": "string",
                            "value": "CLIENT"
                        },
                        {
                            "key": "internal.span.format",
                            "type": "string",
                            "value": "proto"
                        }
                    ],
                    "logs": [],
                    "processID": "p2",
                    "warnings": null
                },
                {
                    "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                    "spanID": "c3eba4eae4a758b3",
                    "flags": 1,
                    "operationName": "do_espresso",
                    "references": [
                        {
                            "refType": "CHILD_OF",
                            "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                            "spanID": "7d361a6ee4495aea"
                        }
                    ],
                    "startTime": 1592969640229366,
                    "duration": 1620113,
                    "tags": [
                        {
                            "key": "component",
                            "type": "string",
                            "value": "http"
                        },
                        {
                            "key": "http.method",
                            "type": "string",
                            "value": "POST"
                        },
                        {
                            "key": "http.server_name",
                            "type": "string",
                            "value": "127.0.0.1"
                        },
                        {
                            "key": "http.scheme",
                            "type": "string",
                            "value": "http"
                        },
                        {
                            "key": "host.port",
                            "type": "int64",
                            "value": 8082
                        },
                        {
                            "key": "http.host",
                            "type": "string",
                            "value": "localhost:8082"
                        },
                        {
                            "key": "http.target",
                            "type": "string",
                            "value": "/do_espresso"
                        },
                        {
                            "key": "net.peer.ip",
                            "type": "string",
                            "value": "127.0.0.1"
                        },
                        {
                            "key": "net.peer.port",
                            "type": "int64",
                            "value": 38692
                        },
                        {
                            "key": "http.flavor",
                            "type": "string",
                            "value": "1.1"
                        },
                        {
                            "key": "http.route",
                            "type": "string",
                            "value": "/do_espresso"
                        },
                        {
                            "key": "http.status_text",
                            "type": "string",
                            "value": "OK"
                        },
                        {
                            "key": "http.status_code",
                            "type": "int64",
                            "value": 200
                        },
                        {
                            "key": "status.code",
                            "type": "int64",
                            "value": 0
                        },
                        {
                            "key": "status.message",
                            "type": "string",
                            "value": ""
                        },
                        {
                            "key": "span.kind",
                            "type": "string",
                            "value": "SERVER"
                        },
                        {
                            "key": "internal.span.format",
                            "type": "string",
                            "value": "proto"
                        }
                    ],
                    "logs": [],
                    "processID": "p2",
                    "warnings": null
                },
                {
                    "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                    "spanID": "bf7c4dbac9943752",
                    "flags": 1,
                    "operationName": "/espresso",
                    "references": [
                        {
                            "refType": "CHILD_OF",
                            "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                            "spanID": "c3eba4eae4a758b3"
                        }
                    ],
                    "startTime": 1592969640233035,
                    "duration": 1523076,
                    "tags": [
                        {
                            "key": "component",
                            "type": "string",
                            "value": "http"
                        },
                        {
                            "key": "http.method",
                            "type": "string",
                            "value": "POST"
                        },
                        {
                            "key": "http.url",
                            "type": "string",
                            "value": "http://localhost:8083/espresso"
                        },
                        {
                            "key": "http.status_code",
                            "type": "int64",
                            "value": 200
                        },
                        {
                            "key": "http.status_text",
                            "type": "string",
                            "value": "OK"
                        },
                        {
                            "key": "status.code",
                            "type": "int64",
                            "value": 0
                        },
                        {
                            "key": "status.message",
                            "type": "string",
                            "value": ""
                        },
                        {
                            "key": "span.kind",
                            "type": "string",
                            "value": "CLIENT"
                        },
                        {
                            "key": "internal.span.format",
                            "type": "string",
                            "value": "proto"
                        }
                    ],
                    "logs": [],
                    "processID": "p2",
                    "warnings": null
                },
                {
                    "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                    "spanID": "9eae5de3dc2b143d",
                    "flags": 1,
                    "operationName": "espresso",
                    "references": [
                        {
                            "refType": "CHILD_OF",
                            "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                            "spanID": "bf7c4dbac9943752"
                        }
                    ],
                    "startTime": 1592969640241888,
                    "duration": 1510074,
                    "tags": [
                        {
                            "key": "component",
                            "type": "string",
                            "value": "http"
                        },
                        {
                            "key": "http.method",
                            "type": "string",
                            "value": "POST"
                        },
                        {
                            "key": "http.server_name",
                            "type": "string",
                            "value": "127.0.0.1"
                        },
                        {
                            "key": "http.scheme",
                            "type": "string",
                            "value": "http"
                        },
                        {
                            "key": "host.port",
                            "type": "int64",
                            "value": 8083
                        },
                        {
                            "key": "http.host",
                            "type": "string",
                            "value": "localhost:8083"
                        },
                        {
                            "key": "http.target",
                            "type": "string",
                            "value": "/espresso"
                        },
                        {
                            "key": "net.peer.ip",
                            "type": "string",
                            "value": "127.0.0.1"
                        },
                        {
                            "key": "net.peer.port",
                            "type": "int64",
                            "value": 59618
                        },
                        {
                            "key": "http.flavor",
                            "type": "string",
                            "value": "1.1"
                        },
                        {
                            "key": "http.route",
                            "type": "string",
                            "value": "/espresso"
                        },
                        {
                            "key": "http.status_text",
                            "type": "string",
                            "value": "OK"
                        },
                        {
                            "key": "http.status_code",
                            "type": "int64",
                            "value": 200
                        },
                        {
                            "key": "status.code",
                            "type": "int64",
                            "value": 0
                        },
                        {
                            "key": "status.message",
                            "type": "string",
                            "value": ""
                        },
                        {
                            "key": "span.kind",
                            "type": "string",
                            "value": "SERVER"
                        },
                        {
                            "key": "internal.span.format",
                            "type": "string",
                            "value": "proto"
                        }
                    ],
                    "logs": [],
                    "processID": "p3",
                    "warnings": null
                },
                {
                    "traceID": "771d70ff86fe03a66d7d97c221836cdf",
                    "spanID": "7d361a6ee4495aea",
                    "flags": 1,
                    "operationName": "/do_espresso",
                    "references": [],
                    "startTime": 1592969640220800,
                    "duration": 1630845,
                    "tags": [
                        {
                            "key": "component",
                            "type": "string",
                            "value": "http"
                        },
                        {
                            "key": "http.method",
                            "type": "string",
                            "value": "POST"
                        },
                        {
                            "key": "http.url",
                            "type": "string",
                            "value": "http://localhost:8082/do_espresso"
                        },
                        {
                            "key": "http.status_code",
                            "type": "int64",
                            "value": 200
                        },
                        {
                            "key": "http.status_text",
                            "type": "string",
                            "value": "OK"
                        },
                        {
                            "key": "status.code",
                            "type": "int64",
                            "value": 0
                        },
                        {
                            "key": "status.message",
                            "type": "string",
                            "value": ""
                        },
                        {
                            "key": "span.kind",
                            "type": "string",
                            "value": "CLIENT"
                        },
                        {
                            "key": "internal.span.format",
                            "type": "string",
                            "value": "proto"
                        }
                    ],
                    "logs": [],
                    "processID": "p4",
                    "warnings": null
                }
            ],
            "processes": {
                "p1": {
                    "serviceName": "the-cashdesk",
                    "tags": []
                },
                "p2": {
                    "serviceName": "the-coffee-bar",
                    "tags": []
                },
                "p3": {
                    "serviceName": "the-coffee-machine",
                    "tags": []
                },
                "p4": {
                    "serviceName": "the-coffee-lover",
                    "tags": []
                }
            },
            "warnings": null
        }
    ],
    "total": 0,
    "limit": 0,
    "offset": 0,
    "errors": null
}

@mat-rumian
Copy link
Author

@ocelotl thanks a lot for fixing! :) I will wait till new release to check if everything works fine :)

toumorokoshi added a commit that referenced this issue Jul 8, 2020
Fixes #832. By having tracer creation occur on demand, late tracer provider configuration will be honored. 

This resolves issues with instrumentation occurring before tracer providers are set by the application developer, which would result in the no-op tracer used for the lifetime of the instrumentation.

Co-authored-by: alrex <[email protected]>
Co-authored-by: Leighton Chen <[email protected]>
Co-authored-by: Yusuke Tsutsumi <[email protected]>
cnnradams pushed a commit to cnnradams/opentelemetry-python that referenced this issue Jul 23, 2020
Fixes open-telemetry#832. By having tracer creation occur on demand, late tracer provider configuration will be honored. 

This resolves issues with instrumentation occurring before tracer providers are set by the application developer, which would result in the no-op tracer used for the lifetime of the instrumentation.

Co-authored-by: alrex <[email protected]>
Co-authored-by: Leighton Chen <[email protected]>
Co-authored-by: Yusuke Tsutsumi <[email protected]>
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this issue Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants