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

Fixes and refactors trace v2 #288

Merged
merged 4 commits into from
Dec 1, 2023
Merged

Fixes and refactors trace v2 #288

merged 4 commits into from
Dec 1, 2023

Commits on Nov 23, 2023

  1. Fixes and refactors trace v2

    The trace v2 package was not working properly. It didn't support naming
    the system and the integration with another packages were broken, e.g.,
    not being injected on the logs.
    
    I tried to solve all the issues without breaking too much compatibility
    but some breaking changes on trace v2 were made.
    
    The tracking middleware were coupling request and trace packages. I
    split the middleware into two (the old one still exists but now is
    deprecated), so request and trace has each one its own middleware. The
    request middleware should be used after the trace middleware so it can
    inject the request-id into the trace.
    
    The previous middleware supports both versions of trace so it can be
    used during the phasing out of v1.
    
    The span object in trace v2 was dropped in favor of the otel span
    directly. The otel span is already an interface and it is very
    powerful. If we would wrap this interface we would need to write too
    much code and still would lose some of its power. Because otel is a good
    market standard I felt confident in exposing it's span and use the trace
    v2 package only as an orquestrator.
    
    The example was also redone and it's now complete dockerized and using
    jaeger to collect and serve the traces.
    
    A new gokit endpoint middleware was created that starts a trace for the
    endpoint but also handle errors and allows for custom attributes to be
    inserted on the span.
    rjfonseca committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    29326d5 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. PR fixes

    The Dockerfile was dropped and the docker-compose was enhanced due to
    security issues raised by sonar.
    
    Custom configuration was dropped in favor of the official environment
    variables.
    
    README as converted into a proper godoc.
    
    Added some sanity checks for checking for missing environment
    variables when the default OpenTelemetry values are not ideal.
    rjfonseca committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    abbfbc0 View commit details
    Browse the repository at this point in the history
  2. Fix lint issues

    rjfonseca committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    99d036f View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2023

  1. Fix typos and removes cache from docker example

    The cache was supposed to be committed commented out.
    rjfonseca committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    2e650f8 View commit details
    Browse the repository at this point in the history