Comments (3)
The plugin runner already includes a stackID
attribute in its queryData
span:
I am not sure if adding the stack id to the resource attributes makes sense, as those should be for information about the running process/environment, not the request:
https://opentelemetry.io/docs/instrumentation/go/resources/
POC PR #769 implements adding it as a span attribute instead, but that would include the stackID
/tenant_id
in all spans that are created by the plugin via tracing.DefaultTracer()
:
(tenant_id
is added automatically):
ctx, span := tracing.DefaultTracer().Start(
ctx,
"query processing",
trace.WithAttributes(
attribute.String("query.ref_id", query.RefID),
attribute.String("query.type", query.QueryType),
attribute.Int64("query.max_data_points", query.MaxDataPoints),
attribute.Int64("query.interval_ms", query.Interval.Milliseconds()),
attribute.Int64("query.time_range.from", query.TimeRange.From.Unix()),
attribute.Int64("query.time_range.to", query.TimeRange.To.Unix()),
),
)
defer span.End()
from grafana-plugin-sdk-go.
from grafana-plugin-sdk-go.
closing as fixed by #769
from grafana-plugin-sdk-go.
Related Issues (20)
- Docs: Update developer-guide.md in regards to Generate Go code for Protobuf definitions
- Potential data race in tracing middleware HOT 1
- Instancemgmt: Instance possibly being disposed while still being in use
- Instrumentation: Automatically include contextual/trace id information in log messages HOT 1
- An error occurred when executing mage - v HOT 5
- An error occurred when executing mage - v HOT 9
- Add a way to get the Grafana instance URL from backend plugins HOT 2
- Darwin ARM64 not built for build:debug mage target HOT 3
- Debug mode not working in LLM plugin HOT 7
- Frame incorrectly parses Uint64 values HOT 1
- Support building plugins for FreeBSD amd64 HOT 1
- sqlutil.FrameFromRows: multiple results sets with different columns fail HOT 1
- Allow to set the same header multiple time in Prometheus Datascources HOT 1
- Fix flaky test
- Errorsource's RoundTripper returns custom error alongside response HOT 3
- Supports "Host" custom header for DataSources HOT 2
- Update functionality brought in from sqlds
- Macros can consume too much of a query containing parentheses
- getMacroMatches panics if given a macro arg string missing its close bracket HOT 1
- Standalone not erroring when required files are missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-plugin-sdk-go.