-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[exporter/datadogexporter] Add logs support #13987
[exporter/datadogexporter] Add logs support #13987
Conversation
c2777d7
to
06721ee
Compare
06721ee
to
188386d
Compare
l.AdditionalProperties[otelSeverityNumber] = fmt.Sprintf("%d", lr.SeverityNumber()) | ||
} else if lr.SeverityText() != "" { | ||
status = lr.SeverityText() | ||
l.AdditionalProperties[otelSeverityText] = lr.SeverityText() |
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.
Right now, if there is a SeverityNumber present, we skip this code block and we don't add the SeverityText as an additional property. I think the additional properties should be added regardless; that is if the SeverityText and/or SeverityNumber are present, we should always preserve them as otelSeverityText and/or otelSeverityNumber. The if/else logic should only apply to what we use for the official status.
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.
LGTM, no further comments from my side :)
Once Nick's comments are addressed this will be good to merge
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.
Approved pending a few minor last comments.
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.
I have to review further, submitting what I have so far in case it helps.
l.Service = datadog.PtrString(serviceName) | ||
} | ||
|
||
// we need to set log attributes as AdditionalProperties |
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.
Why? Can you explain in the comment please?
// traceIDToUint64 converts 128bit traceId to 64 bit uint64 | ||
func traceIDToUint64(b [16]byte) uint64 { |
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.
These should be shared but that's for another PR.
…dd-logs-support-datadog
1574385
to
f246e2f
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.
Please go through all the comments in the PR and make sure they are resolved. You've omitted some of them.
@@ -0,0 +1,18 @@ | |||
// Copyright The OpenTelemetry Authors |
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.
// Copyright The OpenTelemetry Authors | |
// Copyright The OpenTelemetry Authors |
@@ -0,0 +1,72 @@ | |||
// Copyright The OpenTelemetry Authors |
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.
// Copyright The OpenTelemetry Authors | |
// Copyright The OpenTelemetry Authors |
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 |
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.
// http://www.apache.org/licenses/LICENSE-2.0 | |
// http://www.apache.org/licenses/LICENSE-2.0 |
…dd-logs-support-datadog
Description: Add logs support for datadog exporter
Link to tracking Issue: [issue] (#2651)
Testing:
Documentation: Will add examples in the follow up PR