Skip to content
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

[cmd/telemetrygen] Add TraceID and SpanID support for logs in tracegen #33234

Conversation

jpkrohling
Copy link
Member

Signed-off-by: Juraci Paixão Kröhling juraci@kroehling.de

@jpkrohling jpkrohling requested a review from a team May 27, 2024 10:19
@github-actions github-actions bot added the cmd/telemetrygen telemetrygen command label May 27, 2024
Comment on lines +23 to +25
errInvalidTraceIDLenght = fmt.Errorf("TraceID must be a 32 character hex string, like: 'ae87dadd90e9935a4bc9660628efd569'")
errInvalidSpanIDLenght = fmt.Errorf("SpanID must be a 16 character hex string, like: '5828fa4960140870'")
errInvalidTraceID = fmt.Errorf("failed to create traceID byte array from the given traceID, make sure the traceID is a hex representation of a [16]byte, like: 'ae87dadd90e9935a4bc9660628efd569'")
errInvalidSpanID = fmt.Errorf("failed to create SpanID byte array from the given SpanID, make sure the SpanID is a hex representation of a [8]byte, like: '5828fa4960140870'")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When no format, use errors.New

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used to think the same, but they are now equivalent and I find it more consistent to use only one for both cases.

cmd/telemetrygen/internal/logs/logs.go Outdated Show resolved Hide resolved
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
@jpkrohling jpkrohling force-pushed the jpkroehling/add-traceid-spanid-to-tracegen branch from df5c6b0 to 736e02b Compare May 28, 2024 06:50
@jpkrohling jpkrohling merged commit 9a0a8fa into open-telemetry:main May 28, 2024
162 checks passed
@github-actions github-actions bot added this to the next release milestone May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/telemetrygen telemetrygen command
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants