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

Otel metrics and traces #460

Merged
merged 21 commits into from
Feb 9, 2024

Commits on Nov 16, 2023

  1. Move addMetricsIfPresent into the metrics builder as a first class me…

    …thod for others to leverage.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    a4caca7 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. WIP to play with OpenTelemetry metric instruments and tracer spans.

    Most of this is just playing, but making the StreamManager implement AutoCloseable gives a place to end spans to show how long a serializer/connection factory was relevant for.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    c026588 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2023

  1. Get gradle files and docker-compose in order to support otlp exports …

    …to the collector to prometheus, zipkin, etc
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    f3c0077 View commit details
    Browse the repository at this point in the history
  2. WIP

    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    7fb8e2e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a8ae3d1 View commit details
    Browse the repository at this point in the history
  4. Add labels to each metric instrument so that multiple values can be p…

    …lotted within the same graph in prometheus.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    da9d36b View commit details
    Browse the repository at this point in the history
  5. Move the MetricsClosure into its own class and stop stuffing the metr…

    …ics into an optional.
    
    Dropping the optionals makes the code simpler and if we don't want to do logging, we can just not fill in the configuration for the SDK.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    06618ca View commit details
    Browse the repository at this point in the history
  6. WIP - Cleanup + get Jaeger to work by switching the endpoint. Also in…

    …troduce some more typesafe wrappers for contexts.
    
    Lots more to come.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    aba1aab View commit details
    Browse the repository at this point in the history
  7. Start moving away from ThreadLocal and 'current contexts' and toward …

    …explicitly passing strongly typed context objects.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    900bc6d View commit details
    Browse the repository at this point in the history
  8. Get span parenting to work.

    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    3746a8e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e0e7bf1 View commit details
    Browse the repository at this point in the history
  10. Attempt to fix a failing unit test.

    Make sure that the context is using the right requestKey, which also will have the appropriate indices as per the test context.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    4b43262 View commit details
    Browse the repository at this point in the history
  11. Refactor. Couple name changes, class package changes, and moved IRepl…

    …ayerRequestContext to the replayer
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    322e12f View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2023

  1. Bundle all of the offloader spans with the netty handler spans.

    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    723bf77 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2023

  1. Improve the tracing story for the capture proxy.

    Don't bother showing the Kakfa offloader just buffering (was called recordStream).  Now the offloader span is a child span of the connection span from the handler, so we can see the handler gathering the request/response (or waiting for the response).
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Dec 2, 2023
    Configuration menu
    Copy the full SHA
    15a1705 View commit details
    Browse the repository at this point in the history
  2. Tracing change: Flatten the flush span and just record it as 'blocked'.

    That makes it a separate state for the logging handler superclass.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Dec 2, 2023
    Configuration menu
    Copy the full SHA
    8a6f52a View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2023

  1. Minor cleanup - stop setting the namespace or trying to change in a p…

    …rocessor.
    
    Prometheus metrics already have an export_name that is unique, the processors weren't doing anything useful, & the namespace was appending EVERYTHING from one of the two services.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    c50e01d View commit details
    Browse the repository at this point in the history
  2. Start instrumenting the replayer with more contexts so that traces an…

    …d (less so for now) metrics can be exported across more of the lifetime of a request/connection.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    17c517d View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2023

  1. Double down on using Context objects in lieu of String labels and fix…

    … a test bug.
    
    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    6288844 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'FixKafkaResume' into OtelMetricsAndTraces

    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    
    # Conflicts:
    #	TrafficCapture/nettyWireLogging/src/main/java/org/opensearch/migrations/trafficcapture/netty/ConditionallyReliableLoggingHttpRequestHandler.java
    #	TrafficCapture/nettyWireLogging/src/main/java/org/opensearch/migrations/trafficcapture/netty/LoggingHttpRequestHandler.java
    #	TrafficCapture/nettyWireLogging/src/test/java/org/opensearch/migrations/trafficcapture/netty/ConditionallyReliableLoggingHttpRequestHandlerTest.java
    #	TrafficCapture/trafficCaptureProxyServer/src/main/java/org/opensearch/migrations/trafficcapture/proxyserver/netty/ProxyChannelInitializer.java
    #	TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/Accumulation.java
    #	TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/CapturedTrafficToHttpTransactionAccumulator.java
    #	TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/RequestResponsePacketPair.java
    #	TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/RequestSenderOrchestrator.java
    #	TrafficCapture/trafficReplayer/src/test/java/org/opensearch/migrations/replay/SimpleCapturedTrafficToHttpTransactionAccumulatorTest.java
    gregschohn committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    09e849c View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2023

  1. Merge branch 'main' into OtelMetricsAndTraces

    Signed-off-by: Greg Schohn <greg.schohn@gmail.com>
    gregschohn committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    9cf2540 View commit details
    Browse the repository at this point in the history