You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each telemetry tool seems to have its own convention for identifying HTTP routes:
GET /pet/{petId} (as in LinkerD)
vs get /pet/:petId (as in Zipkin's http.route tag)
vs get_/pet/_petId_ (as in Datadog APM's resource_name tag)
Our SRE team is considering leveraging the Open API spec (maybe the native operationId) to define a canonical identifier for each HTTP route in the enterprise. This concretely looks like providing "product teams" with easy hooks to associate the identifier label with all telemetry data (metris, logs, traces) associated with a given route; the ubiquity of the identifier will then make it possible for platform teams to a variety of tools with self-service capabilities (e.g. auto-generated Datadog Dashboards, CloudWatch Alarms, etc.) without having to know the HTTP route formatting nuances of each tool in our ecosystem.
If there was a way to control the route.name of Service Profiles generated with an Open API definition it would be much easier to integrate LinkerD into our internal tool ecosystem. For instance it would be trivial to build tools that take a service's Open API definition and:
find all Service Profile routes associated with a given service
auto-generate a Datadog dashboard widget slicing & dicing the LinkerD metrics for each route
How should the problem be solved?
Ideally users would be able use some aspect of the Open API spec to control the route.name attribute when auto-generating a Service Profile with the --openapi flag.
I propose offering an info-level vendor extension x-linkerd-route-lookup* that allows users to indicate a path attribute to lookup (via operation.JSONLookup) and overwrite the route.name:
A. The most naive approach would be to set route.name equal to the operationId when it's available. Sadly, some popular tools auto-populate the operationId field using less-than-ideal conventions, and it's likely that elevating the operationId to the default route.name would have unintentional & undesirable side effects for many users.
B. Another approach would be to follow the precedent set by #4072 and #4052 and allow users to decorate each route with a vendor extension (maybe x-linkerd-route?). In effect, though, this would create cruft for the users who are most likely to need this feature (and might already have a per-route vendor extension of their own):
Users would activate this feature by adding the vendor extension x-linkerd-route-lookup* to the info section of the Open API spec before passing it into the linkerd profile --open-api {{spec}} {{service}} command. For instance, consider a route whose route.name resolves to:
GET /pets/{id}
The user might want to make LinkerD routes & metrics consistent with other tools that use the operationId field to identify unique routes. This can be achieved using the x-linkerd-route-lookup*
Feature Request
What problem are you trying to solve?
Each telemetry tool seems to have its own convention for identifying HTTP routes:
GET /pet/{petId}
(as in LinkerD)get /pet/:petId
(as in Zipkin'shttp.route
tag)get_/pet/_petId_
(as in Datadog APM'sresource_name
tag)Our SRE team is considering leveraging the Open API spec (maybe the native
operationId
) to define a canonical identifier for each HTTP route in the enterprise. This concretely looks like providing "product teams" with easy hooks to associate the identifier label with all telemetry data (metris, logs, traces) associated with a given route; the ubiquity of the identifier will then make it possible for platform teams to a variety of tools with self-service capabilities (e.g. auto-generated Datadog Dashboards, CloudWatch Alarms, etc.) without having to know the HTTP route formatting nuances of each tool in our ecosystem.If there was a way to control the
route.name
of Service Profiles generated with an Open API definition it would be much easier to integrate LinkerD into our internal tool ecosystem. For instance it would be trivial to build tools that take a service's Open API definition and:How should the problem be solved?
Ideally users would be able use some aspect of the Open API spec to control the
route.name
attribute when auto-generating a Service Profile with the--openapi
flag.I propose offering an info-level vendor extension
x-linkerd-route-lookup
* that allows users to indicate apath
attribute to lookup (via operation.JSONLookup) and overwrite theroute.name
:Any alternatives you've considered?
A. The most naive approach would be to set
route.name
equal to theoperationId
when it's available. Sadly, some popular tools auto-populate theoperationId
field using less-than-ideal conventions, and it's likely that elevating theoperationId
to the defaultroute.name
would have unintentional & undesirable side effects for many users.B. Another approach would be to follow the precedent set by #4072 and #4052 and allow users to decorate each route with a vendor extension (maybe
x-linkerd-route
?). In effect, though, this would create cruft for the users who are most likely to need this feature (and might already have a per-route vendor extension of their own):How would users interact with this feature?
Users would activate this feature by adding the vendor extension
x-linkerd-route-lookup
* to theinfo
section of the Open API spec before passing it into thelinkerd profile --open-api {{spec}} {{service}}
command. For instance, consider a route whoseroute.name
resolves to:The user might want to make LinkerD routes & metrics consistent with other tools that use the
operationId
field to identify unique routes. This can be achieved using thex-linkerd-route-lookup
*Alternatively if the user's platform team has already coined an extension to serve the same purpose they can provide that instead:
*
x-linkerd-route-lookup
is the first thing that came to mind, I don't have a strong opinion for how this is named.The text was updated successfully, but these errors were encountered: