Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    brian-groux-hs
    @brian-groux-hs
    Hey all. Does anyone know why when I run prometheus.InstallNewPipeline in a subroutine (not on main thread), meter.RecordBatch stops working but observers work fine?
    2 replies
    Tyler Yahn
    @MrAlias
    I made a proposal to address the API revert we discussed last week in the SIG meeting here: open-telemetry/opentelemetry-go#1303
    If you have some time please take a look. New Relic has brought on some familiar contractors to help us get OpenTelemetry over the GA goal line and krnowak is planning to dig into that issue.
    anuragbeniwal
    @anuragbeniwal
    Novice here. Looking at gRPC go instrumentation. Could someone clarify my understanding for bidi streaming? Does it create 1 span per service with events added for every send/rcv or 1 span for send/recv?
    If it is 1 span per stream then for long running bidi service would it just keep building in memory or is there some way to flush the current trace even though the RPC itself is still running?
    Tyler Yahn
    @MrAlias
    @anuragbeniwal what you described is how the otelgrpc instrumentation handles the situation: https://github.com/open-telemetry/opentelemetry-go-contrib/tree/master/instrumentation/google.golang.org/grpc/otelgrpc
    anuragbeniwal
    @anuragbeniwal
    @MrAlias : Just to be clear you mean 1 span per service rather than 1 span per send/recv correct?
    Tyler Yahn
    @MrAlias
    1 span per stream with span events tracking all send/receive messages.
    anuragbeniwal
    @anuragbeniwal
    @MrAlias : Great thanks for confirming. In that case do you have any insight/recommendations about my second question about flushing and preventing the span for getting too big for long running streams?
    Tyler Yahn
    @MrAlias
    Nothing other than the unhelpful "try not to keep streams open that long"
    @anuragbeniwal I think it makes sense to open an issue in the opentelemetry-go-contrib repo to track that question
    Please, let me know if you are able to open the issue or would like me to.
    anuragbeniwal
    @anuragbeniwal
    Thanks @MrAlias . I opened open-telemetry/opentelemetry-go-contrib#436
    Aaron Tye
    @atye
    Hello. I have a question about the OpenTelemetry Collector, hopefully this is an appropriate channel. If I want to run the collector with mTLS, is there anything special I have to do? In https://github.com/open-telemetry/opentelemetry-collector/tree/master/receiver/otlpreceiver#communicating-over-tls, I see you can specify a private key and a public cert file in the receiver configuration to configure TLS. And in my Go client OTLP exporter, I can use the otlp.WithTLSCredentials option to create a credential with the public Collector certificate file. But for mTLS, Do I need to specify any Certificate Authority for the Collector? If so, is there a configuration for that?
    7 replies
    Domin Thomas
    @dominthomas

    Does anyone know if any additional configuration in opentelemetry-go is required if you have a go service that starts the request chain followed by multiple Java services?

    I can see the distributed traces for all java services (via java-instrumentation) but the initial handoff from the GoLang service to the Java Service followed by traces from the remaining Java services can't be seen from the first go service trace.

    7 replies
    Chris Bandy
    @cbandy
    I'm looking through the defaults and automatic configuration and noticed this: Should opts also be passed through here?
    https://github.com/open-telemetry/opentelemetry-go/blob/master/global/internal/trace.go#L87
    10 replies
    Aaron Tye
    @atye

    Hello, how does the HTTPS_PROXY environment variable work for exporters in the Collector? https://github.com/open-telemetry/opentelemetry-collector/tree/master/exporter#proxy-support

    I assume I need to specify a certificate and a key right? Does it use the same cert and key that I configure in the receiver tls_settings? I searched for HTTPS_PROXY in the Collector repo but the only hit I got was in the exporter README.

    Ilya Kaznacheev
    @ilyakaznacheev
    Hi all! Just want to share, that my team waiting for the release to use it in our cloud platform for tracing and monitoring in production. So probably we will give some feedback based on our experience.
    I've already tried current versions but waiting for the release to fix the API and write our internal observability library on top of it.
    Keep going! You're doing a great job!
    Omar Eltamasehy
    @oeltamasehy_gitlab

    Dears,
    Appreciate your support for the below issue,
    I built my open telemetry demo as the below steps,

    • I built two microservices one by Django and the another by Go, Django send HTTP request to Go service,
    • Jaeger tool is configured for UI tracing,
    • Unfortunately, Django tracing and Go tracing are separated in Jaeger tool and I do not know the reason although I received Django parent trace id in the request header and it is normal to be all Django request tracing including Go tracing as one request tracing in Jaeger,
      My Git repo: https://github.com/OmarEltamasehy/django-gotracing-example

    Thanks for your time and consideration.

    6 replies
    Sam Xie
    @XSAM
    SpanContext from tracing seems an API in the specification. Should we consider changing this from struct into the interface?
    https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#spancontext
    4 replies
    @MrAlias
    Sreevani K V S
    @Sreevani871
    Hi, I am facing issues while raising PR to opentelemetry-go-contrib repo. I am encountering missing go.mod dependabot check: for $make recommit. go.mod file is available in the listed folder. what would be the reason for this?
    4 replies
    Joshua MacDonald
    @jmacd

    Hey all, yesterday I open-sourced a new sidecar for OTel and Prometheus, which is the unnamed piece of code behind issue #1324 (OTLP protobuf class def conflicts):

    https://github.com/lightstep/opentelemetry-prometheus-sidecar

    Just wanted to share -- I ported all the OpenCensus and Prometheus instrumentation to OTel tracing and metrics. Some observations:

    • Adding HTTP and gRPC tracing w/ a single line of code each: awesome
    • OTel metrics API: I feel good about the before/after diff. For example, there were 3 Prometheus gauges which mapped into a SumObsever (it's a constant), an UpDownSumObserver (number of write threads), and an UpDownCounter (queue size increment/decrements).

    Great work everyone! ^^^

    One thing was missing as I converted from OpenCensus to OTel: we don't have gRPC metrics in the gRPC instrumentation package.

    Bharathi Ram
    @bharathiraam_twitter
    Screen Shot 2020-11-18 at 5.14.28 PM.png
    Arun Gopalpuri
    @arun0009
    Can we add tracing to streams? (Kafka & Kinesis)
    2 replies
    Kenneth Tan
    @dustyhorizon
    heya just wondering if its possible to override the sampling decision at certain functions i.e. if i hit an error
    im looking to do probablistic sampling based on traceID for all traces but sample 100% traces that have an error
    3 replies
    Manimaran11
    @Manimaran11
    Hey, I am looking into open-telemetry/opentelemetry-go#1320 . Can anyone please give me an idea about this
    4 replies
    Kenneth Tan
    @dustyhorizon

    one more question tho, how can I inject extra attributes? I am trying to inject user info into a baggage but it does not appear in zipkin/honeycomb

    currently I have a session http middleware that 1) checks for bearer tokens and 2) resolves the user if the token exists

    below is a code snippet of how I am trying to do this

    ctx = otel.ContextWithBaggageValues(
                ctx,
                semconv.EnduserIDKey.String(user.Id),
                semconv.EnduserRoleKey.String(user.Role.String()),
            )

    I am assuming baggage works like metadata in gRPC where it will be automatically propagated to upstream gRPC server(s) i.e. request IDs but this does not seem to be the case for baggages

    am I missing out on something?

    Anthony Mirabella
    @Aneurysm9
    to propagate that baggage through a request you would need to 1) ensure the Context containing the baggage is in the http.Request 2) use an otelhttp.Transport with 3) a Baggage propagator in either the global propagator or provided to the transport
    the otelhttp/example/client illustrates 1, 2, and 3
    Kenneth Tan
    @dustyhorizon

    ah after looking through the example again, seems like what i needed was to "set attribute" of the current span, i assumed baggage automatically adds all set attributes to all future spans for that context.

    on that note, is that possible? to set attributes for all future spans (but not specifying at global tracer using WithResource as i may/may not have the user info

    5 replies
    Tyler Yahn
    @MrAlias
    Tyler Yahn
    @MrAlias
    Anthony Mirabella
    @Aneurysm9
    :thumbsup:
    Tyler Yahn
    @MrAlias
    Release v0.14.0 of go.opentelemetry.io/otel has been published https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.14.0 :tada: :clap:
    cc @Aneurysm9 @jmacd @codeboten
    1 reply
    (contrib repository to follow)
    Anthony Mirabella
    @Aneurysm9
    :tada:
    Joshua MacDonald
    @jmacd
    :tada: !!!
    Thanks @MrAlias . This is a huge release!
    Tyler Yahn
    @MrAlias
    Absolutely! Thanks to everyone who contributed to this release :pray:
    Sandra McMullen
    @awssandra
    Just saw the newest release - very cool!!
    Tyler Yahn
    @MrAlias
    Márk Sági-Kazár
    @sagikazarmark

    Congrats for the new release. It's great. The API seems much more readable now.

    I've updated my PR to the contrib repo: open-telemetry/opentelemetry-go-contrib#456

    Can someone take a look at it?

    2 replies
    Cameron Moberg
    @Noremac201

    Hey all, let me know if this is the wrong place to ask this -

    Is there a best practice for having multiple resources for the same metric? It would have the same label key, just different value. Looks like its currently attached to pushers, should I make a new pusher for each metric? an alternative would be to somehow move metric label -> resource label if thats possible in the collector. Any ideas?

    2 replies
    Simpa Lainään
    @bombsimon_twitter
    Hello! Does anyone know if there's a Zipkin propagator to be used for optentelemetry-go? I found zipkin-go-opentracing which has a propagator but no public accessors to get the propagataro.
    1 reply
    Diego Hurtado
    @ocelotl

    Hello

    I ran two different (but semantically equivalent) scripts, one implemented in Python, other one implemented in Go. These scripts simply sent OTLP metrics to a collector server which prints these metrics in JSON.

    These are the 2 scripts:

    package main
    
    import (
        "context"
        "log"
    
        "go.opentelemetry.io/otel/label"
        "go.opentelemetry.io/otel"
        "go.opentelemetry.io/otel/exporters/otlp"
        "go.opentelemetry.io/otel/sdk/metric/controller/push"
        "go.opentelemetry.io/otel/sdk/metric/selector/simple"
        "go.opentelemetry.io/otel/sdk/metric/processor/basic"
        "go.opentelemetry.io/otel/metric"
    )
    
    var Must = metric.Must
    
    func main() {
        ctx := context.Background()
    
        exporter, err := otlp.NewExporter(
            otlp.WithAddress("127.0.0.1:7000"),
            otlp.WithInsecure(),
        )
        if err != nil {
            log.Fatalf("failed to create exporter: %v", err)
        }
        defer func() {
            err := exporter.Shutdown(ctx)
            if err != nil {
                log.Fatalf("failed to stop exporter: %v", err)
            }
        }()
    
        pusher := push.New(
            basic.New(
                simple.NewWithExactDistribution(),
                exporter,
            ),
            exporter,
        )
        pusher.Start()
        defer pusher.Stop()
        otel.SetMeterProvider(pusher.MeterProvider())
    
        meter := otel.Meter("name", metric.WithInstrumentationVersion("version"))
    
        labels1 := []label.KeyValue{label.String("A", "B")}
    
        counter := Must(meter).NewInt64Counter(
            "name",
            metric.WithDescription("description"),
            metric.WithUnit("1"),
        )
        counter.Add(ctx, 1, labels1...)
    }
    from opentelemetry import metrics
    from opentelemetry.exporter.otlp.metrics_exporter import OTLPMetricsExporter
    from opentelemetry.sdk.metrics import MeterProvider
    
    meter_provider = MeterProvider()
    metrics.set_meter_provider(meter_provider)
    meter = metrics.get_meter_provider().get_meter(
        "name", instrumenting_library_version="version"
    )
    meter_provider.start_pipeline(
        meter,
        OTLPMetricsExporter(endpoint="127.0.0.1:7000", insecure=True),
        interval=1
    )
    counter = meter.create_counter(
        name="name",
        description="description",
        unit="1",
        value_type=int,
    )
    
    counter.add(1, labels={"A": "B"})
    6 replies
    Simpa Lainään
    @bombsimon_twitter
    How do I get the span from a remote context? In my incoming HTTP request, I do otel.GetTextMapPropagator().Extract(r.Context(), r.Header) which returns ContextWithRemoteSpanContext. This menas that when I call trace.SpanFromContext(ctx) I won't get a span because it's in the remoteContext, not the currentSpan. Any suggestions?
    5 replies
    Wilbert Guo
    @wilguo
    Hey guys, has anyone run into this error when trying to do make precommit? I was moving some go files from one folder to another in the go-contrib repo.
    go: finding module for package go.opentelemetry.io/otel/api/metric
    go: finding module for package go.opentelemetry.io/otel/api/trace
    go: finding module for package go.opentelemetry.io/otel/api/global
    ../../../../net/http/otelhttp/config.go:22:2: module go.opentelemetry.io/otel@latest found (v0.14.0), but does not contain package go.opentelemetry.io/otel/api/global
    ../../../../net/http/otelhttp/config.go:23:2: module go.opentelemetry.io/otel@latest found (v0.14.0), but does not contain package go.opentelemetry.io/otel/api/metric
    ../../../../net/http/otelhttp/config.go:24:2: module go.opentelemetry.io/otel@latest found (v0.14.0), but does not contain package go.opentelemetry.io/otel/api/trace
    make: *** [build] Error 1
    2 replies
    Bryan Boreham
    @bboreham
    Question: I have a component which sits in a pipeline, calling SpanExporter. Are there any packages which can help me write unit tests for it?
    E.g. a mock exporter, something to compare expected against actual spans.
    Jonas Brunsgaard
    @brunsgaard
    I have a an application collection metrics to a prometheus.Registry are there a way I can use the existing registry and prometheus_client lib and send the metics to a opentel-collector using the OpenTelemetry Collector Go Exporter from my application?
    1 reply