elastic / elastic/apm-agent-nodejs

make span.setDbContext public

Open
#3,198 0 comments 0 reactions 0 assignees View on GitHub
agent-nodejs community triage
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

**Is your feature request related to a problem? Please describe.**

At the moment index.d.ts does not have span.setDbContext method while it is used internally in various db instrumentations.

**Describe the solution you'd like**

Add method to index.d.ts and to the documentation.

**Describe alternatives you've considered**

It is possible to add the required data in the span filter.

**Additional context**

I don't need the default instrumentation for db drivers and I want to start and fulfill spans manually. Therefore I need similar methods which are used by internal instrumentation. As I can see setDbContext allows to set the statement, instance and user. I don't need the statement field but want to see instance and user in my traces.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.