Comments (5)
I'll fork, because I need this functionality anyway, and offer a PR that you can accept if you want!
from otelchi.
I was thinking that I would add attributes in the form of serverName.paramName
like app.q
as the name. The honeycomb.io documentation suggests:
Consider putting manual instrumentation under app.. Use as many layers of hierarchy as makes sense: app.shopping_cart.subtotal and app.shopping_cart.items; app.user.email and app.user.id.
from otelchi.
Hello, @willie
Thanks for your interest to contribute in otelchi
!
I would like confirm my understanding first regarding what you want to propose.
I'd like to add support for logging query values to this middleware
Do you mean query string parameters in the URL?
Like for example if we have https://example.com?q=test&page=1
then you want to log the q=test&page=1
in the span attribute? Is this correct?
from otelchi.
Yes, I'd add q : test as one kv pair, then page : 1 as another kv pair. It's a small addition, but helpful for annotating spans.
from otelchi.
I'll fork, because I need this functionality anyway, and offer a PR that you can accept if you want!
I think this is the best, @willie! You rock! 🚀
I'd add q : test as one kv pair, then page : 1 as another kv pair
Actually I'm still hesitant to put this feature into otelchi
because it is an instrumentation library.
In the context of instrumentation library, I believe it is better to strictly follow specification that has been created by OpenTelemetry team to ensure compatibility with the rest of the ecosystem.
In semantic convention for HTTP server (you can read the spec here), the query parameters is only specified in http.target
attribute.
If we decided to add extra attributes for example http.target.query.<param_name>
, in the future we might clash with the official convention (e.g the OpenTelemetry team decided to use http.target.query
for something else). So I believe this feature should be implemented on end user side rather than on instrumentation library like otelchi
.
But this is my current opinion. I might change it in the future.
from otelchi.
Related Issues (12)
- Add filter for ignoring certain endpoints HOT 2
- panic doesn't mark span as error HOT 3
- bug: tracing with empty `spanName` HOT 1
- Metric support HOT 1
- panic in net/http HOT 4
- Trace ID in header HOT 1
- Empty status code in span when handler is not sending data HOT 2
- New Development Strategy HOT 1
- Injecting trace headers? HOT 8
- Use method in span name HOT 8
- question: should the middleware inject the trace context into the http.Request? HOT 3
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 otelchi.