-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(opentelemetry-plugins): move common attributes to core #718
Conversation
Please sign the CLA |
@@ -14,19 +14,36 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
export enum AttributeNames { | |||
export enum CommonAttributeNames { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add comments with links to the appropriate semantic convention specs?
export enum CommonAttributeNames {
// Required on all spans
COMPONENT = 'component',
// HTTP Span attributes https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-http.md
HTTP_METHOD = 'http.method',
HTTP_URL = 'http.url',
HTTP_TARGET = 'http.target',
HTTP_HOST = 'http.host',
HTTP_SCHEME = 'http.scheme',
... and so on
I signed it |
Signed-off-by: Ruben Vargas <[email protected]>
3654e37
to
805977a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this is generally an improvement, but I think it raises a few other questions:
- should this be in core or types/api?
- is there a reason this is an enum and not just an object? objects would allow us to nest attributes and have for instance
AttributeNames.db.required.type
- if we keep this as an enum, should it be a const enum? then it would compile away.
@open-telemetry/javascript-approvers WDYT?
Additionally, I would like to see jsdocs on each one explaining what it is, when it is required, and what its value should be. For instance, in http
if you have http.url
you don't need http.scheme
, http.host
, or http.target
. Additionally, client and server spans have different required attributes.
Also agree that jsdoc would be better, an extract of the spec would be enough for me |
should this be revisited now and either refactored or closed as we have |
@obecny it can be closed |
Signed-off-by: Ruben Vargas [email protected]
Which problem is this PR solving?
Fixes #522