Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SQL instrumentation with Open Census, Open Tracing, AWS Xray, Google Stack Driver #599

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

aeneasr
Copy link
Member

@aeneasr aeneasr commented Oct 12, 2020

Adds options

	// UseInstrumentedDriver if set to true uses a wrapper for the underlying driver which exposes tracing
	// information in the Open Tracing, Open Census, Google, and AWS Xray format. This is useful when using
	// tracing with Jaeger, DataDog, Zipkin, or other tracing software.
	UseInstrumentedDriver bool
	// InstrumentedDriverOptions sets the options for the instrumented driver. These options are empty by default meaning
	// that instrumentation is disabled.
	//
	// For more information check out the docs at https://github.com/luna-duclos/instrumentedsql. If you use Open Tracing, these options
	// could looks as follows:
	//
	//		InstrumentedDriverOptions: []instrumentedsql.Opt{instrumentedsql.WithTracer(opentracing.NewTracer(true))}
	//
	// It is also recommended to include `instrumentedsql.WithOmitArgs()` which prevents SQL arguments (e.g. passwords)
	// from being traced or logged.
	InstrumentedDriverOptions []instrumentedsql.Opt

to pop.ConnectionDetails, allowing to instrument SQL queries using Open Tracing, Open Census, AWS XRay or Google Stack Driver.

@aeneasr aeneasr requested a review from a team as a code owner October 12, 2020 15:37
@aeneasr aeneasr force-pushed the add-instr-sql-driver branch from af7d9dc to 5f40054 Compare October 12, 2020 15:54
@aeneasr aeneasr requested a review from stanislas-m October 12, 2020 16:11
@aeneasr aeneasr force-pushed the add-instr-sql-driver branch from 5f40054 to 22480bd Compare October 13, 2020 07:19
@aeneasr
Copy link
Member Author

aeneasr commented Oct 14, 2020

@stanislas-m I'm looking into some weird behavior with pgx in combination with instrumentation - please stay tuned before merging :)

Adds options

```
	// UseInstrumentedDriver if set to true uses a wrapper for the underlying driver which exposes tracing
	// information in the Open Tracing, Open Census, Google, and AWS Xray format. This is useful when using
	// tracing with Jaeger, DataDog, Zipkin, or other tracing software.
	UseInstrumentedDriver bool
	// InstrumentedDriverOptions sets the options for the instrumented driver. These options are empty by default meaning
	// that instrumentation is disabled.
	//
	// For more information check out the docs at https://github.com/luna-duclos/instrumentedsql. If you use Open Tracing, these options
	// could looks as follows:
	//
	//		InstrumentedDriverOptions: []instrumentedsql.Opt{instrumentedsql.WithTracer(opentracing.NewTracer(true))}
	//
	// It is also recommended to include `instrumentedsql.WithOmitArgs()` which prevents SQL arguments (e.g. passwords)
	// from being traced or logged.
	InstrumentedDriverOptions []instrumentedsql.Opt
```

to `pop.ConnectionDetails`, allowing to instrument SQL queries using Open Tracing, Open Census, AWS XRay or Google Stack Driver.

Signed-off-by: aeneasr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants