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

[feat] custom user-agent (& expanding OTEL_EXPORTER_OTLP_* env var support) #94

Merged

Commits on Apr 26, 2023

  1. customize the user-agent of the OLTP exporter

    Instead of the Go autoinst agent appearing to telemetry data receivers
    as only the version of grpc-go against which it was built, this adds an
    identifier to the User-Agent header via the dial options parameter
    support within otlptracegrpc.
    
    To help troubleshooting data transmission, runtime operating system and
    CPU architecture is included in the user-agent within a parenthetical
    comment in accordance with the header's specification.[1]
    
    This replaces the low-level build up of a gRPC client connection with a
    reuse of the OTel Go SDK's grpc trace client constructor. A happy
    byproduct of using the SDK's constructor is that all of the
    OTEL_EXPORTER_OTLP_* environment variables related to exporting traces
    ought to be supported now, obviating the need to maintain code here to
    retrieve, interpret, and handle them.
    
    [1] RFC 7231 https://www.rfc-editor.org/rfc/rfc7231#section-5.5.3
        though more readable documentation about this header spec is
        available at MDN Web Docs:
        https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
    robbkidd committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    1ac95db View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    42800c6 View commit details
    Browse the repository at this point in the history
  3. an attempt at adding unit tests

    This is an expendable commit if folks don't like it.
    robbkidd committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    3e6e163 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0028b42 View commit details
    Browse the repository at this point in the history
  5. include scheme for endpoint

    Spec and therefore SDK require the URL scheme in ENDPOINT values.
    robbkidd committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    c13d9a1 View commit details
    Browse the repository at this point in the history
  6. update e2e expectations

    This Go auto-inst adds its version to resource attributes now.
    robbkidd committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    6c7f3d6 View commit details
    Browse the repository at this point in the history
  7. new version.go for the auto package

    The version declared here will get bumped when using the multimod
    releaser utility.
    
    The agent's controller uses this version to include in the User-Agent
    header and in a resource attribute for outgoing telemetry.
    robbkidd committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    074d8c9 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. Configuration menu
    Copy the full SHA
    8279cc4 View commit details
    Browse the repository at this point in the history
  2. test potentially testable modules

    Modeled after the test targets in OpenTelemetry Go.
    
    Removes the "maybe use gotestsum if you've got it!" option.
    robbkidd committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    335f20d View commit details
    Browse the repository at this point in the history
  3. improve code comment for auto.Version()

    Co-authored-by: Tyler Yahn <[email protected]>
    robbkidd and MrAlias authored Apr 27, 2023
    Configuration menu
    Copy the full SHA
    4a4cd13 View commit details
    Browse the repository at this point in the history
  4. test is PHONY

    Always Be Testing.
    
    Co-authored-by: Tyler Yahn <[email protected]>
    robbkidd and MrAlias authored Apr 27, 2023
    Configuration menu
    Copy the full SHA
    dbf3f0e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    81f9d5d View commit details
    Browse the repository at this point in the history