Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Raja Moola Mahadevan
    @mmraja83
    image.png
    Hi, I have been trying to setup Otl for Javascript (Angular) application. Everything works fine. But it is showing "unknown service " in the zipkin after the trace. Does anyone know how to mention the service name ?
    Konig-Corey
    @Konig-Corey
    Can someone PLEASE point me to where/how I can configure additional attributes/labels on metrics being consumed by the host metric receiver in the otel agent configuration and being exported with the awsemf exporter? I have not been able to successfully apply additional attributes/dimensions and this seems like a rudimentary feature so I must just be doing it wrong.
    Anupam Dalmia
    @anupamdalmia10
    11 replies
    Aritra Das
    @dev-aritra

    Using lightstep-opentelemetry-launcher-node
    When I use the public sattelite spans are received correctly on the dashboard.
    But as soon as I put my private satellite it stops receiving spans.
    My private satellite is reachable from the host machine.

    Satellite Status
    ✓ ready / healthy
    ✓ alive
    ✓ configuration parsed

    Satellite staus also shows ok.
    Can someone tell what could be wrong?

    akash19980
    @akash19980
    new WinstonInstrumentation({
            // Optional hook to insert additional context to log metadata.
            // Called after trace context is injected to metadata.
            logHook: (record, span) => {
              record['resource.service.name'] =
                provider.resource.attributes['service.name'];
            },
          }),

    Im trying top instrument winston in my application. then logging inside this example function

    const winston = require('winston');
    const logger = winston.createLogger({
      transports: [new winston.transports.Console()],
    });
    export async function nExample() {
      const span = track.startSpan('spanStarted', {
        attributes: {
          'code.function': 'Example Function',
        },
      });
      logger.info('zbc');
      for (var i = 0; i < 10; i++) {
        await console.log('Span is started');
      }
      span.end();

    But im not able to see trace id and spanid in the log. Can anyone suggest me the solution or if i am doing something wrong or am i missing something

    Konig-Corey
    @Konig-Corey

    Has anyone seen this error when trying to write to Amazon Managed Prometheus

    2021-08-26T19:17:41.683Z    error    exporterhelper/queued_retry.go:288    Exporting failed. The error is not retryable. Dropping data.    {"kind": "exporter", "name": "awsprometheusremotewrite", "error": "Permanent error: [Permanent error: invalid temporality and type combination; Permanent error: invalid temporality and type combination; Permanent error: invalid temporality and type combination]", "dropped_items": 66}

    The error doesn't really make much sense to me and I can't seem to find any instances of others having the same issue. Thoughts?

    Konig-Corey
    @Konig-Corey
    Opened a bug ticket about prometheus writter. Any input would be greatly apprecaited: open-telemetry/opentelemetry-collector-contrib#4909
    Ivan Pukhtin
    @StreetStrider
    I need my child span to be in child_process. How can I pass context to subprocesses?
    Pranay Prateek
    @pranay01_twitter
    ➜  otlp-exporter-node git:(main) ✗ npm install
    npm ERR! code E404
    npm ERR! 404 Not Found - GET https://registry.npmjs.org/@opentelemetry%2fexporter-otlp-grpc - Not found
    npm ERR! 404 
    npm ERR! 404  '@opentelemetry/exporter-otlp-grpc@0.25.0' is not in the npm registry.
    npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
    npm ERR! 404 
    npm ERR! 404 Note that you can also install from a
    npm ERR! 404 tarball, folder, http url, or git url.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/pranay/.npm/_logs/2021-10-04T14_15_50_188Z-debug.log

    It seems the required packages are not in npm registry yet

    how to solve this?

    Richard W
    @RichardWright
    Is this the best place to ask questions about the design of the nodejs metrics client? \
    I've given up trying to get the UpDown counter to function like a gauge, I think (correct me if I'm wrong) but the createUpDownSumObserver behaves like a gauge should - as in the value can be set, not just what it should increment/decrement by.
    is there a way to use this without hard coding the callback? I'm trying not to spread the state of an rxjs observable outside of it, but without the 'observe' function working, this is sort of impossible.
    kpreeti2588
    @kpreeti2588
    Nest
    vanseverk
    @vanseverk
    Hi guys, we have a large number of nodejs applications that we want to be able to get traces and metrics from in a product-agnostic way, and to get that information to Datadog. This is why we have been looking into opentelemetry. It currently already puts the required trace IDs on our logs, but right now we are also trying to get those traces to Datadog. This is on EKS where we have a Datadog agent running in a Daemonset. I found that there's an exporter https://github.com/Datadog/dd-opentelemetry-exporter-js but that is marked as deprecated - despite being referenced as an integration possibility in the Datadog documentation. Does that mean we would be forced to set up this OTEL collector to feed the Datadog agent? We would definitely prefer not to go that path, as it would require extra setup
    Omkar Kirpan
    @OmkarKirpan

    We are trying to integrate opentelemetry in our microservices with istio. we are facing an integration issue since istio is creating and forwarding x-b3 headers which open telemetry is not expecting. Opentelemetry is not able to extract spans created by istio in x-b3-header.

    Are there any guides for implementing open-telemetry in an istio environment?

    Or-Zarchi-Forter
    @Or-Zarchi-Forter
    As been asked before by @svetlanabrennan, when tracing an incoming http request, is there a way to attach a http header as an attribute to all future child spans created in the context of the request?
    In other words, is there a way to customize the context automatically created by HttpInstrumentation by adding more context fields? That way I can automatically propagate said fields to all subsequent spans (maybe by writing a custom span processor)
    Some vendors like honeycomb that leverage OT call it Multi span attributes
    I haven't been able to achieve it with the node SDK
    5 replies
    Konig-Corey
    @Konig-Corey
    Is it expected that that OTEL instrumentation in go does not also publish metrics related to published traces? Previously in datadog when a trace was published it also automatically published metrics related to the trace. (E.i http.request.hits with a count of requests, as well as the endpoint and response code of that request). Is this something that has to be manually instrumented? This seems like an easy win and most people would want metrics generated from traces as well.
    Brad Frost
    @bradfrosty
    Hello, I'm trying to debug why multiple spans are created when using the user interaction plugin (open-telemetry/opentelemetry-js-contrib#548). Looking at the instrumentation code, I'm wondering what the purpose is for the _incrementTask() method. This is always 1 (initial increment), even when the event target is the same. Under what scenarios would this be greater than 1?
    2 replies
    Konig-Corey
    @Konig-Corey
    Does anyone have a solution to getting automatic metrics generated from traces? This is something that datadog seemed to do out of the box and was wondering if there are any processors/recievers that will assist in auto generating metrics based off recieved traces?
    Konig-Corey
    @Konig-Corey
    How can I send the otel collection agents logs to a file when running in a docker container? I looked into the file exporter but that is much to verbose for what im looking for. I am primarly interested in the otel collectors startup logs. Is the best/only way to capture the stdout logs to use a docker log driver?
    hongyi192
    @hongyi192

    Hi all, I'm wondering how NodeTracerProvider works under the hood, for example if I do this

    const provider = new NodeTracerProvider(tracerConfig);
    
    // add OTLP exporter
    const otlpExporter = new CollectorTraceExporter();
    
    provider.addSpanProcessor(new SimpleSpanProcessor(otlpExporter));
    
    provider.register();

    how does the provider run in the background to listen for requests/response, and then export the spans to the configured collector, like is there a daemon process that's run alongside the Node.js process, or it's within the same process?

    jgguevara
    @jgguevara
    Does anyone have some sample code on how to create a child span from another service that was invoked via a message broker?
    1 reply
    jgguevara
    @jgguevara
    Is it possible to start a new span with a given trace ID. I was hoping to use a trace ID generated by another framework?
    hongyi192
    @hongyi192
    (this is more of a question for web but I can't find a gitter channel for that) Are there code examples of mixing auto-instrumentation with manual ones? For example I'm using FetchInstrumentation to instrument every fetch request, but I want to add different span attributes based on the type of request.
    Praneeth
    @sai579
    I am using ConsoleSpanExporter as an exporter. I see that the spans are exported to console after a delay of around 2 min. Does anyone know if there Is any way i can export the spans to console immediately without the delay?
    puttaiah-telus
    @puttaiah-telus

    Hi I am keep getting below error, when to export ReactJS traces to Dynatrace via OTLPTraceExporter

    "stack":"OTLPExporterError: Failed to export with XHR (status: 415)\n at new e

    Could you please help me on this

    Ruben Martinez Jr.
    @rubencodes

    I have a problem I was hoping someone could help me debug/think through.

    I'm working adding some server-side telemetry within the confines of a server plugin. As a plugin, I have certain hooks exposed to me, for example let's say requestStart and requestEnd. What I'd like to do is to start a span when the request starts, end it when the request ends, and have any any spans created underneath the request level link to the request span as the parent.

    It's the last part that's the problem. As far as I can tell, the way to set the parent span for underlying requests is using api.context.with—this takes a function, and within the function, the context is set whatever I want (in this case, the request span context). The problem of course is that the work happening to resolve the request happens completely outside my little plugin—which again, just knows when the request starts and ends.

    I see that under the hood, AsyncHooksContextManager has private _enterContext and _exitContext mechanisms that would be perfect for what I need - call _enterContext on requestStart, _exitContext on requestEnd. In fact, I tried calling them, and that worked great! But they're private methods, so of course I don't want to rely on them. Is there an alternative I'm missing? This seems like a pretty basic thing once might want to do, but I must be missing something.

    4 replies
    Danilo Delizia
    @ddelizia

    I am trying to setup manual instrumentation to forward the trace and span id. I have an http client that calls an http node server.

    The http client:

    const span = tracer.startSpan("client");
    const ctx = trace.setSpan(context.active(), span);
    // At this point context has span information
    
    context.with(ctx, async () => {
        const currentContext = context.active()
        // The currentContext object is empty so there is no span registered here.
    
        const headers = {}
        propagation.inject(context.active(), headers);
       // Do http request with the headers 
       // At this point no headers are forwarded the server, so server will init a new span
    });

    It seems that in the context.with function I am not able to access the context information

    legendsjohn
    @legendsjohn
    Was wondering if anyone has had success with open-telemetry/opentelemetry-js#1315 - I've tried some of the solutions listed: moving the httpInstrumentation.register() and using getNodeAutoInstrumentations() but neither worked
    1 reply
    Anuj Srivastava
    @anujsr12
    hey can anyone help me setting up opentelemetry in node js
    is the exporter need need to be shutdown after span end? "exporter.shutdown()"
    Pedro Tavares
    @pedrotavares-MG
    Hi,
    I have some apps build with the serverless framework and typescript. Any of you have a good example of how to instrument the apps in this setup ?
    Keval
    @Bhogayata-Keval
    Is there any way, as of now, to export "logs" from nodejs ? My backend is in golang, where I have already written code to receive logs, but found no way to collect and export them from nodejs, any experimental support in progress ?
    Semih Ural
    @uralsemih
    Hey All,
    I am looking for some examples with nodejs and java which using b3-propagation with opentelemetry... can someone have any example reference ?
    Keval
    @Bhogayata-Keval

    This query is regarding an application which involves "opentelemetry-js + opentelemetry-proto + rust grpc server ", therefore adding it here:

    Using this particular proto file given below
    https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto
    I have created a grpc server in Rust and implemented the export method like this :

    impl MetricsService for MyMetrics {
        async fn export(
            &self,
            request: Request<ExportMetricsServiceRequest>,
        ) -> Result<Response<ExportMetricsServiceResponse>, Status> {
            println!("Got a request from {:?}", request.remote_addr());
            println!("request data ==> {:?}", request);
    
    
            let reply = metrics::ExportMetricsServiceResponse {};
            Ok(Response::new(reply))
        }
    }

    To test this code,
    1) I created a grpc client in node.js with same proto file and called the export method - which worked as expected.


    2) Then, I used otlpmetricsexporter in node.js (instead of making an explicit call to export method), in this case, I am not receiving the request on Rust grpc server.

    Getting this error :
    {"stack":"Error: 12 UNIMPLEMENTED: \n at Object.callErrorFromStatus (/home/acq053/work/src/github.com/middleware-labs/agent-node-metrics/node_modules/@grpc/grpc-js/build/src/call.js:31:26)\n at Object.onReceiveStatus (/home/acq053/work/src/github.com/middleware-labs/agent-node-metrics/node_modules/@grpc/grpc-js/build/src/client.js:189:52)\n at Object.onReceiveStatus (/home/acq053/work/src/github.com/middleware-labs/agent-node-metrics/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141)\n at Object.onReceiveStatus (/home/acq053/work/src/github.com/middleware-labs/agent-node-metrics/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)\n at /home/acq053/work/src/github.com/middleware-labs/agent-node-metrics/node_modules/@grpc/grpc-js/build/src/call-stream.js:187:78\n at processTicksAndRejections (internal/process/task_queues.js:75:11)","message":"12 UNIMPLEMENTED: ","code":"12","metadata":"[object Object]","name":"Error"}

    My Rust Grpc server is running @ [::1]:50057
    so, I used OTEL_EXPORTER_OTLP_ENDPOINT=[::1]:50057 env while running my node.js exporter

    What could have gone wrong ?!

    _

    Sébastien Renault
    @srenault
    Hello there, I'm trying to setup telemetry to monitor an AWS Lambda function. I setup telemetry using this https://aws-otel.github.io/docs/getting-started/lambda/lambda-js. In my lambda I'm trying to track http calls I'm doing with Axios without any success for now. Is axios supported by @opentelemetry/instrumentation-http.
    3 replies
    Craig Ringer
    @ringerc

    Hi folks. Hope it's OK to drop in here with a question? I'm struggling with the express autoinstrumentation in the otel node support. I've injected it into my app using --require as documented, along with the http, pg, and grpc instrumentations. HTTP, Pg and GRPC instrumentations all work without issues, but I cannot get the Express instrumentation to report any spans.

    It does not appear to fire any hooks either. e.g. ExpressInstrumentation({requestHook: function (span: Span, info: ExpressRequestInfo) { process.exit(1); }}) does not cause the process to exit.

    I'm using the registerInstrumentations interface - registerInstrumentations({instrumentations: [new HttpInstrumentation(),new ExpressInstrumentation()]}).

    Versions:

    • "@opentelemetry/api": "^1.2.0"
    • "@opentelemetry/instrumentation-express": "^0.31.0"
    • "@opentelemetry/instrumentation-http": "^0.31.0"
    • "@opentelemetry/sdk-trace-node": "^1.6.0"
    • "express": "4.18.1",

    It's a large enough app that I can't easily distill a minimal demo, and it's not entirely mine to share anyway. I'm happy to extract and share the full tracing require script though.

    I'm mostly looking for advice on how I might go about investigating and diagnosing the issue. I'm pretty new to node (more comfortable in C, golang, Python, or anything else) so it might be something that should be painfully obvious to an experienced FE dev.

    Craig Ringer
    @ringerc
    I've tried integrating the instrumentation into the Express app's app.ts where the Express modules are imported and the const app = express(); call exists. When I do that only manual spans work; the http autoinstrumentation doesn't seem to load either.
    Craig Ringer
    @ringerc

    Oh, node v18.8.0, npm n8.18.0

    I've made a drastically cut down demo I can share now.

    Craig Ringer
    @ringerc
    Raised open-telemetry/opentelemetry-js-contrib#1166 since I cooked it down to a SCCE
    Craig Ringer
    @ringerc

    Solved thanks to https://github.com/Flarna 's wonderful hint:

    ensure your bundler does not bundle dependencies you want to instrument (e.g. express must stay in folder node_modules/express)

    The app I was instrumenting used --external:request, which I retained in my cut-down demo. It did not use --external:express, so the express server was bundled. otel auto-instrumentations cannot instrument bundled modules.

    I'd love to see this more prominently highlighted on the docs for the autoinstrumentations bundle and the individual instrumentations, along with a list of which modules should be excluded for any given instrumentation.

    Thomas Alexander
    @tomalex0
    does this library support zpages ? Any recommendations ?
    bharatbcssarl
    @bharatbcssarl
    Hi is there any way to auto-instrument "sequelize": "^5.21.7", "@opentelemetry/plugin-mysql" and "opentelemetry-plugin-sequelize" are not working?
    Brennon Schow
    @brennongs
    hello, I'm assuming that this is the wrong place to ask, but can someone either help me or point me to a community that could help me deploy the otel-collector (specifically the splunk distro) to aws ecs?
    thiago
    @thiagosouza:matrix.org
    [m]
    Hello, is there any nodejs logger that supports sending in otlp log format?