Published by danstarns about 1 year ago
Version 0.1.1
Fixes:
Additions:
This release increases open telemetry spec support by updating the span and attribute names to follow the suit of the specification:
https://opentelemetry.io/docs/specs/otel/trace/semantic_conventions/instrumentation/graphql/
graphql-otel offers the ability to record the args, result, and context and so we added some additions to the specification to support those needs:
https://github.com/open-telemetry/opentelemetry-specification/pull/3668
Published by danstarns about 1 year ago
Bumps the open telemetry packages to the latest versions.
Adds the ability to include the resolver result in the span attributes:
const context = {
GraphQLOTELContext: new GraphQLOTELContext({
includeResult: true, // If true will add the result in the span attributes
}),
};
Published by danstarns over 1 year ago
This adds the ability to exclude keys from the span context attribute.
const context = {
GraphQLOTELContext: new GraphQLOTELContext({
includeContext: true,
includeVariables: true,
excludeKeysFromContext: ["database", 'headers', "token"], <--- large objects, sensitive information
}),
};
Published by danstarns over 1 year ago
This release adds the ability to append the GraphQL context and variables onto the trace attributes.
You can do this by setting either or both options:
new GraphQLOTELContext({
includeContext: true,
includeVariables: true,
});
You will then see the JSON string of variables
and context
in your trace attributes.
Commits
Published by danstarns over 1 year ago
Version 0.0.6 of graphql-otel, span events were introduced to propagate errors. However, at that time, the span status was not being set to error. Now, with the latest changes, you can filter queries that have resulted in errors using the status filter for GraphQL.
Commits:
Published by danstarns over 1 year ago
This release propagates the errors that happen in the GraphQL resolver and appends them as an event on the trace.
This will better help users debug their GraphQL API.