Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Chris
    @ImTheDeveloper
    Hmm using lightstep-open-telemetry-node-launcher which seems to bundle everything together.
    They seem to be running:
    "@opentelemetry/api": "^0.14.0",
    "@opentelemetry/core": "^0.14.0",
    "@opentelemetry/exporter-collector": "^0.14.0",
    "@opentelemetry/host-metrics": "^0.12.0",
    "@opentelemetry/node": "^0.14.0",
    "@opentelemetry/propagator-b3": "^0.14.0",
    "@opentelemetry/plugins-node-core-and-contrib": "^0.12.0",
    "@opentelemetry/resources": "^0.14.0",
    "@opentelemetry/sdk-node": "^0.14.0"
    Alan Storm
    @astorm
    :wave: Hey all -- question for folks more intimately involved in the project that I've been lately. Has there been any talk about how the Node side of the project is going to address to coming ES6 module migration that (parts of) the node community is planning once Node 10 reaches end of life? Specifically -- ES6 modules can't be patched in the same way that require-in-the-middle can which means a lot of auto instrumentation is going to stop working.
    6 replies
    Ben Tilford
    @btilford
    How do you nest spans? It looks like the tracer.withSpan is no longer available
    Daniel Dyla
    @dyladan
    Ben you set the span on the context using api.setSpan and then you use api.context.with
    Ben Tilford
    @btilford
    How do you get a reference to the current parent span for api.setSpan ?
    Daniel Dyla
    @dyladan
    This message was deleted
    If you already have a span in context there is no need to use setSpan
    the only time you need to use setSpan is after you have just created a span. if you extract with a propagator the parent span is already in the context correctly
    Ben Tilford
    @btilford
    So if I'm using the http instrumentation I should be able to create new spans without needing to setup something like fastify opentelementry? Or is some sort of middleware still needed to run the context.with?
    Daniel Dyla
    @dyladan
    if you're using the automatic instrumentation you shouldn't need to use context.with at all. When a request is received headers will be automatically parsed and outgoing requests will be tagged
    Ben Tilford
    @btilford
    yeah, I'm seeing that but custom spans within that call don't appear to be nested from what I can see. Maybe it's the reporting being limited.
    Daniel Dyla
    @dyladan
    can you open a github discussion with a code example?
    Ben Tilford
    @btilford
    yeah, I'm mostly trying figuring out how to add some custom spans/events so I don't have much of an example as far as the telemetry code would work.
    Jeff Mealo
    @jmealo
    hello all, I upgraded from an earlier version of Open Telemetry and I'm getting tracer.getCurrentSpan is not a function. I'm not sure where I'm going wrong, I've updated my usage to the latest examples.
    Bartlomiej Obecny
    @obecny
    @btilford check examples folder
    Jeff Mealo
    @jmealo
    If anyone else has this issue, I believe provider.getTracer('xx') became api.trace.getTracer('xx')
    I'm not sure what the prior does, but it almost certainly doesn't do what it used to
    Daniel Dyla
    @dyladan
    No that is not the case
    that function has not changed
    you should always be using the api functions though after registering your provider
    getCurrentSpan was removed from the tracer. you now need to do api.getSpan(context.active())
    Jeff Mealo
    @jmealo
    :( that breaks @azure/core-tracing I think
    unless I monkey-patch the old method back on there and open up an upstream ticket -- let me confirm that is the case
    Jeff Mealo
    @jmealo
    @dyladan: thank you! I'm back in business, looks like Azure was updated too : fingers crossed :
    Daniel Dyla
    @dyladan
    The azure team does a pretty good job following the most recent developments and microsoft has been actively contributing to otel so i'm not surprised they are updated
    but keep in mind, otel is 0.x software so things can change. fingers crossed we should be 1.0 pretty soon
    Jeff Mealo
    @jmealo
    I'm looking forward to when open telemetry, uniform error handling, and structured logging with consistent log-levels between products are fully supported in the azure-sdk for js. It's a relief to see them going all in on OTEL and making these corrections over the last year. I never thought adding logging, error handling and tracing to a small Node.js API could take 6 months but here we are :D --- Almost complete. Thanks for your help.
    Jeff Mealo
    @jmealo
    I misspoke, it appears @azure/core-tracing still uses getCurrentSpan at least it doesn't throw
    I can't think of a good way to monkey patch that which won't break the trace off the top of my head
    Michael FIG
    @michaelfig
    Is anybody working on Prometheus summaries (i.e. quantile + sum + count)?
    1 reply
    Nir Hadassi
    @nirsky

    Hey guys, my company manages an open-source plugins repo for otel
    https://github.com/aspecto-io/opentelemetry-ext-js

    I'm trying to migrate the plugins to "Instrumentation" class, seems to work fine but can't get it to work in Jest unit tests.
    Seems like the patch function (passed to InstrumentationNodeModuleDefinition) is not triggered, I think it's related to requreInTheMiddle but not entirely sure.
    Anyone has experience writing instrumentation tests in Jest and can maybe point me to a reference?

    3 replies
    Marcelo Olivas
    @mfolivas
    Wonder if someone can help me. I'm trying to use the AWS opentelemetry library and trying to execute the examples: https://github.com/aws-observability/aws-otel-js/tree/main/sample-apps. However, I'm getting the following error. I followed the following steps, including running the ADOT Collector: https://aws-otel.github.io/docs/getting-started/collector
    Any suggestions?
    {"stack":"Error: 14 UNAVAILABLE: failed to connect to all addresses\n    at Object.exports.createStatusError (/Users/marcelo/development/open-source/aws-otel-js/sample-apps/node_modules/grpc/src/common.js:91:15)\n    at Object.onReceiveStatus (aws-otel-js/sample-apps/node_modules/grpc/src/client_interceptors.js:1209:28)\n    at InterceptingListener._callNext (/Users/marcelo/development/open-source/aws-otel-js/sample-apps/node_modules/grpc/src/client_interceptors.js:568:42)\n    at InterceptingListener.onReceiveStatus (/Users/marcelo/development/open-source/aws-otel-js/sample-apps/node_modules/grpc/src/client_interceptors.js:618:8)\n    at callback (/Users/marcelo/development/open-source/aws-otel-js/sample-apps/node_modules/grpc/src/client_interceptors.js:847:24)","message":"14 UNAVAILABLE: failed to connect to all addresses","code":"14","metadata":"[object Object]","details":"failed to connect to all addresses","name":"Error"}
    16 replies
    Weyert de Boer
    @weyert
    what are the plans for the contrib repo release?
    Ted Young
    @tedsuo
    Hello! Does the JS SIG believe it will have a release candidate coming out this week? We’re releasing a v1.0 announcement tomorrow. Should I include JS in the list of SIGs issuing a release candidate?
    2 replies
    ^ fyi @dyladan @obecny @vmarchaud
    Marcelo Olivas
    @mfolivas
    sorry guys for ranting out, but what's the best way to startup with telemetry? I want to have tracing, custom metrics, and standard logs. I'm using the serverless framework using AWS lambda. I have looked into the opentelemetry for AWS but the demo that they have is not working.
    2 replies
    Jeff Mealo
    @jmealo
    I tried to upgrade to the latest versions of everything and I see duplicate log entries for loading plugins and all dependency HTTP requests are duplicated in Application Insights. When I add a break point to the routine for loading plugins it's only called once. Anyone have any thoughts on debugging duplicate spans and possible "double instrumentation?"
    Bartlomiej Obecny
    @obecny
    please open github discussion and show yr code with package.json info
    Jeff Mealo
    @jmealo
    I may have to because it happens with the jaeger exporter too :(
    I thought it had to do with using keep-alive agents but DNS is duplicated too
    Siddhesh Mhadnak
    @sid-maddy
    Hi, folks! I have a question. Does the library support receiving trace id <32 characters length?
    1 reply
    Bryan Hunt
    @BryanHunt
    Is there an updated example of creating a child span somewhere?
    Bryan Hunt
    @BryanHunt
    I think I figured it out ...
    tracer.startSpan('access', undefined, setSpan(context.active(), parentSpan));
    The old way was way more intuitive.
    Paul Rhodes
    @withnale

    Heya. We're using opentelemetry across a number of languages. In our python code we're able to do the following to set default attributes for every span.

    trace.set_tracer_provider(TracerProvider(
        resource=Resource.create({
            'RELEASE': os.environ.get('RELEASE_NAME', 'unknown'),
            'COMPONENT': os.environ.get('COMPONENT', 'appname'),
            'VERSION': os.environ.get('APP_VERSION', 'unknown')
        })
    ))

    Is there a way to do something similar in the node library?

    Daniel Dyla
    @dyladan
    Please either use github discussions or the CNCF slack https://slack.cncf.io #otel-js
    Marcelo Olivas
    @mfolivas

    hey guys while trying to run the example on opentelemetry-js https://github.com/open-telemetry/opentelemetry-js/tree/main/getting-started#initialize-a-global-tracer I am getting the following error once I added the followingtracing.js code:

    'use strict';
    
    const { LogLevel } = require("@opentelemetry/core");
    const { NodeTracerProvider } = require("@opentelemetry/node");
    const { registerInstrumentations } = require("@opentelemetry/instrumentation");
    
    const provider = new NodeTracerProvider({
      logLevel: LogLevel.ERROR
    });
    
    provider.register();
    
    registerInstrumentations({
      tracerProvider: provider,
    });

    and then try to run node -r ./tracing.js app.js

    node -r ./tracing.js app.js 
    /Users/marcelo/development/open-source/opentelemetry-js/getting-started/example/tracing.js:8
      logLevel: LogLevel.ERROR
                         ^
    
    TypeError: Cannot read property 'ERROR' of undefined
        at Object.<anonymous> (/Users/marcelo/development/open-source/opentelemetry-js/getting-started/example/tracing.js:8:22)
        at Module._compile (internal/modules/cjs/loader.js:1151:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
        at Module.load (internal/modules/cjs/loader.js:1000:32)
        at Function.Module._load (internal/modules/cjs/loader.js:899:14)
        at Module.require (internal/modules/cjs/loader.js:1040:19)
        at Module._preloadModules (internal/modules/cjs/loader.js:1296:12)
        at loadPreloadModules (internal/bootstrap/pre_execution.js:435:5)
        at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:68:3)
        at internal/main/run_main_module.js:7:1