question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spdy: No active transaction found - cannot build new span

See original GitHub issue

I am trying to set up the agent in my Node app. I am not seeing logs; when I set logLevel to trace, I see these sorts of errors:

(on a route which makes a call to an Elasticsearch instance):

2019-04-03T11:09:15.183Z | INFO | Events GET attempt by 
no active transaction found - cannot build new span
intercepted call to elasticsearch.Transport.prototype.request { id: null, method: 'POST', path: '/sb-app-events-*/_search' }
could not instrument elasticsearch request { id: null }
no active transaction found - cannot build new span

(on a route which makes a call to a MySQL backend):

2019-04-03T11:09:15.180Z | INFO | GET user preferences attempt by 
capturing custom stack trace for knex
shimming knex runner.query
intercepted call to knex runner.query
no active transaction found - cannot build new span
intercepted call to mysql connection.query { id: null }

Expected behavior I’d like to trace transactions with the APM agent.

Environment (please complete the following information)

  • OS: Windows 10
  • Node.js version: 10.14.2
  • APM Server version: 6.4.7
  • Agent version:2.7.1

How are you starting the agent? (please tick one of the boxes)

  • Calling agent.start() directly (e.g. require('elastic-apm-node').start(...))

  • Requiring elastic-apm-node/start from within the source code

  • Starting node with -r elastic-apm-node/start

  • Agent config options

Click to expand
const apm = require('elastic-apm-node').start({
    // Set custom APM Server URL (default: http://localhost:8200)
    serverUrl: "http://server-address:8200",
    logLevel: 'trace'
})
  • package.json dependencies:
Click to expand
    "bcrypt": "^3.0.5",
    "blt-http2-router": "^0.5.4404",
    "blt-log": "^0.5.3564",
    "blt-smc-event-types-subtypes": "^0.5.5941",
    "blt-web-utils": "^0.5.3314",
    "body-parser": "^1.18.3",
    "bookshelf": "^0.14.2",
    "bookshelf-json-columns": "^2.1.1",
    "bookshelf-upsert": "^0.2.0",
    "connect-timeout": "^1.9.0",
    "cookie-parser": "~1.4.4",
    "debug": "~4.1.1",
    "dotenv": "^6.2.0",
    "elastic-apm-node": "^2.7.1",
    "elasticsearch": "^15.4.1",
    "express": "^4.16.4",
    "express-fileupload": "latest",
    "express-ipfilter": "^0.3.1",
    "http-errors": "~1.7.2",
    "jwt-simple": "^0.5.5",
    "kafka-streams": "^4.8.0",
    "knex": "^0.16.3",
    "knex-migrate": "^1.7.2",
    "knex-schema-reader": "git+https://git@github.com/mattjcowan/knex-schema-reader.git",
    "lodash": "^4.17.11",
    "moment": "latest",
    "morgan": "^1.9.1",
    "mysql": "^2.16.0",
    "mysql2": "^1.6.5",
    "nock": "^10.0.6",
    "parse-error": "^0.2.0",
    "passport": "^0.4.0",
    "passport-jwt": "^4.0.0",
    "pug": "2.0.3",
    "query-string": "^6.4.2",
    "request": "^2.88.0",
    "request-ip": "^2.1.3",
    "request-promise-native": "^1.0.7",
    "spdy": "^4.0.0",
    "sqlite": "^3.0.3",
    "uuid4": "^1.1.4",
    "validator": "^10.11.0",
    "winston": "^3.2.1",
    "winston-daily-rotate-file": "^3.8.0"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
watsoncommented, Apr 3, 2019

I hope next week - but no promises.

In the meantime, you could use this code here for inspiration on how to add the header manually yourself (this is the code that currently adds it to outgoing HTTP requests):

https://github.com/elastic/apm-agent-nodejs/blob/853c9ddde1ce2d671e3d478e103edeeac5f29539/lib/instrumentation/http-shared.js#L122-L130

0reactions
boriskogan81commented, Apr 17, 2019

Yes, works great, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Most of the spans can't find current transaction - Elastic Discuss
I have recently added APM support to my app and can see that most of the spans are missing on the trace samples...
Read more >
Elastic APM: Mongoose spans cannot find transaction when ...
I am using Elastic APM. I find that mongoose integration is not working when used with GraphQL/Apollo Server somehow.
Read more >
net/spdy/spdy_network_transaction_unittest.cc - chromium/src
transaction does not create the connection yet, so the second request. // could not use the same connection, whereas running the message loop...
Read more >
Google Cloud metrics - Monitoring
Query latency distribution. Sampled every 60 seconds. After sampling, data is not visible for up to 180 seconds. user : The user of...
Read more >
Networking 101: Transport Layer Security (TLS)
§Proxies, Intermediaries, TLS, and New Protocols on the Web ... and this should not come as a surprise, the RSA handshake is now...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found