Comments (10)
@morigs I think do not need to set method name to span name, as the attributes already set. It works fine with Tracing service
from contrib.
@WLun001 on your screenshot, there is method name in span name. Is it from the instrumentation from this repo? Because I cannot find where it adds method to span name
from contrib.
the method name adds from here, not from span name
Line 57 in 97ea1c0
from contrib.
What tracing tool do you use? For example, Jaeger groups all spans in "operations" by span names. This means that all spans with name "/users/id" will be in one operation, even if they have different attributes. This is confusing and complicates search
from contrib.
I am testing with https://uptrace.dev/, could you share your screenshot with Jaeger? I never use it before
from contrib.
@WLun001 In Jaeger it looks like this. As you can see, there is no method in operation name. So all paths with different methods are grouped together
from contrib.
@morigs I think we can do something like this to allow custom format. What do you think?
from contrib.
@WLun001 sounds good. However, I think that span name should include method name by default, because Jaeger is very popular and other tracing systems works similarly.
Span name should specific enough to identify specific operation. OpenTelemetry semantic conventions mention this as a best practice.
from contrib.
@morigs not sure if we should do that. If you look at current implementation, they did not include method name
https://github.com/open-telemetry/opentelemetry-go-contrib/tree/7e31ebe040306aee2c826972269f938f9f0e7c34/instrumentation
from contrib.
@WLun001
Not really. otelhttp.NewHandler
accepts user-specified name of the span through operation
parameter. So it's up to the user to specify a name that specific enough to identify the handler.
For example, I can use it this way: otelhttp.NewHandler(postHandler, "create-enitity")
and otelhttp.NewHandler(deleteHandler, "delete-enitity")
.
However, gofiber instrumentation doesn't require operation name, it sets the name to the route path by default, what causes problems.
Spec describes recommended span names. Example from spec: get_account
, not just account
.
I understand your point, just making my point clear. If you think that custom formatter will be enough, well, OK. That solves the problem, that's what matters.
from contrib.
Related Issues (20)
- π [Feature]: My (simple) SSEFiber Package HOT 1
- π€ [Question]: Could you mint a new release? HOT 3
- π€ [Question]: Not sure how the socket.io requests are being handled HOT 5
- π [Feature]: Casbin: Allow users to use other types of Enforcers HOT 1
- π€ [Question]: otelfiber + otelmongo spans are not being grouped correctly HOT 3
- π [Bug]: i18n middleware panics HOT 17
- π [Feature]: fiberzap accepts custom fields HOT 3
- π [Bug]: Updated struct `value` in `map` after `websoket` connection. HOT 3
- π [Bug]: I have upgraded i18n/v2, but there will still be problems. HOT 15
- π€ [Question]: When use `fiberzap` with `WithContext`, caller maybe not show properly. How do I change itοΌ HOT 3
- π [Bug]: OTeL duplicate and wrong counter metrics are generated infinitely HOT 7
- π€ [Question]: Otelfiber - How to set span status to Error on panic?
- π [Feature]: otelfiber - Propergate tracing headers in outbound response HOT 6
- π [Bug]: Swagger - not test-able (`./swagger.json` file does not exist) HOT 5
- π€ [Question]: is it possible to get the file descriptor from fiber websocket? HOT 1
- π [Bug]: error occored when import github.com/gofiber/contrib/websocket HOT 7
- π [Feature]: Otelfiber allow for manual cancellation of c.UserContext() in otelfiber.Middleware() HOT 1
- π [Bug]: FiberSentry: GetHubFromContext() never returns nil
- π [Feature]: Add golangci-lint
- π€ [Question]: fiberzerolog the banner is not printed. HOT 1
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 contrib.