Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

feat(span-name): add http.path to span name #124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

XinweiLiu28
Copy link

Proposed Changes

To display trace as "Kong, http.method http.path" by adding http.path to the span name.

Reason

The span name is displayed as "http.method" in the main dashboard.
It is difficult to distinguish traces at first glance.
By adding http.path to the span name, the trace would be displayed as "Kong, http.method http.path"

@CLAassistant
Copy link

CLAassistant commented Sep 6, 2021

CLA assistant check
All committers have signed the CLA.

@XinweiLiu28 XinweiLiu28 changed the title feat(span-tag): add http.path to span name feat(span-name): add http.path to span name Sep 6, 2021
@kikito kikito added the enhancement New feature or request label Sep 15, 2021
@bforbis
Copy link
Contributor

bforbis commented Oct 20, 2021

This feature goes against recommendations for span names, as it makes span names have high cardinality and therefore hard to classify spans into groups when doing span searches.

Refer to the Open telemetry spec on http spans.

Instrumentation MUST NOT default to using URI path as span name

@kikito
Copy link
Member

kikito commented Oct 20, 2021

@XinweiLiu28 I agree with bforbis, we should not do it by default. Consider perhaps including a config option to make the user opt-in (and exposing themselves to high cardinality).

@XinweiLiu28
Copy link
Author

Thanks for the advice.
I added an option called "span_display_path", and the default value is false.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants