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

hook otel support up through clog #64

Merged
merged 2 commits into from
Nov 6, 2024
Merged

hook otel support up through clog #64

merged 2 commits into from
Nov 6, 2024

Conversation

ryanfkeepers
Copy link
Contributor

Adds otel support for logging via clog.

Any clog log will automatically duplicate the log via otel logging. We may want deduplication in the future, which will take more effort to support a better interface for logger plug-in. That way we could configure a run for zap, otel, or otel-via-zap.

@ryanfkeepers ryanfkeepers self-assigned this Oct 31, 2024
Base automatically changed from otel-integration to main November 5, 2024 16:53
clog/builder.go Show resolved Hide resolved
clog/builder.go Outdated Show resolved Hide resolved
clog/builder.go Outdated Show resolved Hide resolved
clog/builder.go Outdated
}

if otelLog != nil {
otelLog.Emit(b.ctx, record)

Choose a reason for hiding this comment

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

Assuming we'll update alcion data plane with latest clues at some point, I am a little vary of turning this on by default. Have we evaluated whether this can cause any perf impact? Also, have we tested if initializing an otel endpoint inside ecs works? If not, I'd prefer we make otel hook-in optional. What do you think?

Choose a reason for hiding this comment

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

Ah I am guessing we won't call clues.Initialize in alcion data plane, so otel endpoint will never be stood up.

Choose a reason for hiding this comment

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

Please confirm.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Assuming we'll update alcion data plane with latest clues at some point

Those updates can be frozen and/or use the (now archived) clog repo, instead of the clues repo. There's really no reason to bump the package with us on maintenance mode. Exception cases can be handled as they arise.

guessing we won't call clues.Initialize in alcion data plane

In the case that we do bump clues for alcion, yes, that's definitely the easy way out.

Choose a reason for hiding this comment

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

Got it, thanks!

Adds otel support for logging via clog.

Any clog log will automatically duplicate the log via otel logging.  We
may want deduplication in the future, which will take more effort to
support a better interface for logger plug-in.  That way we could
configure a run for zap, otel, or otel-via-zap.
@ryanfkeepers ryanfkeepers merged commit e64a9d4 into main Nov 6, 2024
1 check passed
@ryanfkeepers ryanfkeepers deleted the clog-otel-intg branch November 6, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants