Comments (6)
As a side note, @ericnograles, thank you for providing such thorough information in your issues! They are like exemplars for how to give enough information for someone else to help! 💞
from honeycomb-opentelemetry-python.
Hi there, @ericnograles!
My first suspect is propagation header format.
I notice that JS frontend is configured in code to propagate trace information with B3 headers.
// setup Propagator
const propagator = new otelCore.CompositePropagator({
propagators: [
new B3Propagator(),
new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })
]
})
provider.register({
contextManager: new ZoneContextManager(),
propagator
});
If your Python backend is not also configured for B3 propagation—which is not the default; propagation format defaults to W3C an OTel SDK—then that would explain this behavior. Both services emit spans, but the backend starts a new trace for its spans because it ignores the B3 header on the incoming traffic from the frontend.
The options I see:
- Configure the Python backend to propagate tracing in-and-out in B3 format. Depending on how you are configuring OpenTelemetry in the backend, this could be as simple as setting the OTEL_PROPAGATORS environment variable to "b3" .
- Configure the JS frontend to propagate with W3C format, unless you have some specific reasons for using B3 like communications with other components in which B3 is the recommended or only supported format. W3C is the default in an OTel SDK, so this option might be a matter of removing the
propagator
construction and its use inprovider.register()
.
from honeycomb-opentelemetry-python.
Too kind @robbkidd, glad to be helpful!
I did remove the propagator from the construction on the JS side and unfortunately still no dice (see screenshot below).
Web App
![image](https://private-user-images.githubusercontent.com/6023705/242317361-ecfcd63b-fed3-486b-b21e-8501cdfdc258.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDM3ODIyNjksIm5iZiI6MTcwMzc4MTk2OSwicGF0aCI6Ii82MDIzNzA1LzI0MjMxNzM2MS1lY2ZjZDYzYi1mZWQzLTQ4NmItYjIxZS04NTAxY2RmZGMyNTgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQUlXTkpZQVg0Q1NWRUg1M0ElMk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rZXlfaWQ9MCZyZXBvX2lkPTAifQ.A41rdc5MaKk0NlkJbWOuuJJ2Sd0c0px_6BgNLu8nV8s)
Logs
I did manage to copy the log of the HTTP call going to Honeycomb. Interestingly, as you see, the parent_id
doesn't seem to get set. Can you spot anything here that might hint at what I may need to do?
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.honeycomb.io:443
{
"name": "/packets",
"context": {
"trace_id": "0xd7504147033ab9c111149b73a0167f3f",
"span_id": "0x3bdd746aa7281e2e",
"trace_state": "[]"
},
"kind": "SpanKind.SERVER",
"parent_id": null,
"start_time": "2023-05-31T14:41:37.882378Z",
"end_time": "2023-05-31T14:41:37.997296Z",
"status": {
"status_code": "UNSET"
},
"attributes": {
"SampleRate": 1,
"http.method": "GET",
"http.server_name": "127.0.0.1",
"http.scheme": "https",
"net.host.port": 5000,
"http.host": "127.0.0.1:5000",
"http.target": "/packets",
"net.peer.ip": "127.0.0.1",
"http.user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36",
"net.peer.port": 53114,
"http.flavor": "1.1",
"http.route": "/packets",
"http.status_code": 200
},
"events": [],
"links": [],
"resource": {
"attributes": {
"telemetry.sdk.language": "python",
"telemetry.sdk.name": "opentelemetry",
"telemetry.sdk.version": "1.17.0",
"service.name": "diffit-api-local",
"honeycomb.distro.version": "0.2.1b0",
"honeycomb.distro.runtime_version": "3.10.4"
},
"schema_url": ""
}
}
from honeycomb-opentelemetry-python.
@ericnograles parent_id
not set is still an indicator that propagation is not aligned between your frontend and backend.
Some things I can think to look at:
- Can you see the headers on HTTP requests received by your backend? If the frontend is correctly configured to propagate W3C trace context, you should see
traceparent
headers on requests from your frontend. - Can you share your updated JS OTel config?
- Can you share your Python backend's OTel config as well? And any
OTEL_*
environment variables you may have set there.⚠️ REDACT any secrets you find in the values for these variables before sharing.
from honeycomb-opentelemetry-python.
Marking this issue as stale because it has been open 14 days with no activity. Please add a comment if this is still an ongoing issue; otherwise this issue will be automatically closed in 7 days.
from honeycomb-opentelemetry-python.
Closing this issue due to inactivity. Please see our Honeycomb OSS Lifecyle and Practices.
from honeycomb-opentelemetry-python.
Related Issues (20)
- docs: update egs to use distro HOT 4
- Automatic Instrumentation doesn't seem to work HOT 3
- Version conflict running honeycomb's opentelemetry-instrument HOT 3
- Auto instrumentation doesn't appear to work in Flask HOT 5
- Auto-instrumented Flask API throws bad requests on routes HOT 2
- Add nightly CI build
- `CVE-2023-33953` in transitive `grpcio` dependency in latest PyPi version HOT 2
- When creating HoneycombOptions, do not append /v1/traces to traces_endpoint if it's already there HOT 1
- Upgrade supported version of OpenTelemetry SDK HOT 5
- [dev] audit of developing.md, releasing.md, and readme.md
- [dev/user] audit of example app as an illustrative example of use HOT 1
- [user] docs.honeycomb HOT 2
- [user] in app quick start HOT 1
- research error in logs of tests
- ci: add test coverage report to tests and upload to Circle?
- validate: manual instrumentation when using the operator HOT 1
- Django docs HOT 2
- DeterministicSampler: Parent-based or not?
- Add HONEYCOMB_API_ENDPOINT as an Option parsed as an environment variable.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honeycomb-opentelemetry-python.