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

Move athens to opentelemetry #1771

Open
manugupt1 opened this issue Apr 11, 2022 · 3 comments · May be fixed by #1891
Open

Move athens to opentelemetry #1771

manugupt1 opened this issue Apr 11, 2022 · 3 comments · May be fixed by #1891
Labels
good first issue Great issues for new Athenians to work on! help wanted Extra attention is needed refactor work to do to refactor code

Comments

@manugupt1
Copy link
Member

manugupt1 commented Apr 11, 2022

Describe the bug
Athens already supports tracing via opencensus; but that is no longer supported and deprecated

Expected behavior
Move to opentelemtry in a non-breaking way.

Environment (please complete the following information):

  • OS: [e.g. Linux 64bit]
  • Go version :
  • Proxy version :
  • Storage (fs/mongodb/s3 etc.) :

Additional context
Add any other context about the problem here.

@manugupt1 manugupt1 added the help wanted Extra attention is needed label Apr 11, 2022
@manugupt1 manugupt1 changed the title Move to opentelemetry Move athens to opentelemetry Apr 11, 2022
uhthomas added a commit to uhthomas/athens that referenced this issue Sep 14, 2023
As described in the linked issue, OpenCensus is to be replaced with
OpenTelemetry. This can be tricky to do in a non-breaking way, and so the
easiest thing to do for now is to use the OpenCensus bridge.

https://opentelemetry.io/blog/2023/sunsetting-opencensus/

https://github.com/open-telemetry/opentelemetry-go/tree/ac5639159f9c8ec161a93b1990e878c74022d49b/bridge/opencensus

Fixes: gomods#1771
@uhthomas uhthomas linked a pull request Sep 14, 2023 that will close this issue
@matt0x6F matt0x6F added refactor work to do to refactor code good first issue Great issues for new Athenians to work on! labels Mar 26, 2024
@jamestelfer
Copy link

Looking at this issue, it seems that a switch to OpenTelemetry could be made in a manner that was non-breaking, but with the possibility of changing the way traces are emitted.

How much change is acceptable?

Given that the OpenCensus libraries are not maintained (the Go library is archived), making a complete switch rather than using a bridge might be the way to go.

See also:

@matt0x6F
Copy link
Contributor

matt0x6F commented Apr 7, 2024

@jamestelfer OpenCensus has been dead for 9 months now. I feel okay about breaking Athens' compatibility with it. I'm willing to hear arguments against it but I think it's a move in the right direction to issue a new minor version with OpenTelemetry when that code is available.

@jamestelfer
Copy link

I had a look around at this issue to see what might be necessary, and have recently implemented OTEL in a different service to gain some familiarity.

The following are my thoughts on the implementation (though note that I am not a repository maintainer, just a random person on the Internet).

The current code surface for writing to spans is quite small: the StartSpan API is used by other components to interact with tracing.

func StartSpan(ctx context.Context, op string) (context.Context, *trace.Span) {
return trace.StartSpan(ctx, op)
}

If this method returned an interface supporting the methods used on the span instead of a direct pointer, an Open Telemetry exporter can be set up as a different option to RegisterExporter. I suggest supporting GRPC and or HTTP channels for telemetry, making the target URL for the chosen variant configurable.

Those using Open Telemetry can direct their output directly to their provider (in the case of say, Honeycomb or Jaeger), or introduce the Open Telemetry collector agent and configure it appropriately for their service. This may be a sidecar image, or another process on the host. Other providers like Datadog support OLTP on their own agents.

Either way, instead of directly supporting different vendors in this project, they would effectively be deprecated in favour of OLTP support.

After a period of months, the old implementations can be removed. This gives users of this server an opportunity to make the switch prior to the removal.

Happy for any thoughts or refinements from maintainers!

@ctgardner FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Great issues for new Athenians to work on! help wanted Extra attention is needed refactor work to do to refactor code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants