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

ddtrace/tracer: add noDebugStack to config when setting error tags #900

Merged
merged 3 commits into from
Apr 16, 2021

Conversation

nicoledanuwidjaja
Copy link
Contributor

@nicoledanuwidjaja nicoledanuwidjaja commented Apr 12, 2021

Sets noDebugStack option in errorConfig so that setTagError only adds debug stack traces when this option is set as false. Added tests to check if tags set as errors properly acknowledge the noDebugStack option set by WithDebugStack().

@nicoledanuwidjaja nicoledanuwidjaja force-pushed the nicoledanuwidjaja/fix-set-tag-error branch from ca4ae0b to 7726bb6 Compare April 12, 2021 20:00
@nicoledanuwidjaja nicoledanuwidjaja added this to the 1.30.0 milestone Apr 12, 2021
@nicoledanuwidjaja nicoledanuwidjaja force-pushed the nicoledanuwidjaja/fix-set-tag-error branch from 7726bb6 to ce49089 Compare April 12, 2021 20:04
@nicoledanuwidjaja nicoledanuwidjaja changed the title ddtrace/tracer: add noDebugStack to config in when setting error tags ddtrace/tracer: add noDebugStack to config when setting error tags Apr 12, 2021
Copy link
Contributor

@gbbr gbbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Nicole! Just some nits in the tests

ddtrace/tracer/tracer_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/tracer_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/span_test.go Show resolved Hide resolved
ddtrace/tracer/span_test.go Outdated Show resolved Hide resolved
@nicoledanuwidjaja nicoledanuwidjaja force-pushed the nicoledanuwidjaja/fix-set-tag-error branch 5 times, most recently from 037945f to 14d8eb8 Compare April 13, 2021 19:43
@@ -145,6 +147,7 @@ func (s *span) setTagError(value interface{}, cfg *errorConfig) {
s.Error = 1
s.setMeta(ext.ErrorMsg, v.Error())
s.setMeta(ext.ErrorType, reflect.TypeOf(v).String())

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get rid of this line.

ddtrace/tracer/tracer_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/span_test.go Outdated Show resolved Hide resolved
@nicoledanuwidjaja nicoledanuwidjaja force-pushed the nicoledanuwidjaja/fix-set-tag-error branch 2 times, most recently from c3a6cde to 8c406ef Compare April 15, 2021 14:38
ddtrace/tracer/span_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/span_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/tracer_test.go Outdated Show resolved Hide resolved
ddtrace/tracer/tracer_test.go Outdated Show resolved Hide resolved
@gbbr
Copy link
Contributor

gbbr commented Apr 15, 2021

You need to rebase on v1 before this can be merged.

@gbbr gbbr merged commit 40f82ff into v1 Apr 16, 2021
@gbbr gbbr deleted the nicoledanuwidjaja/fix-set-tag-error branch April 16, 2021 14:40
stlimtat pushed a commit to stlimtat/dd-trace-go that referenced this pull request May 17, 2021
* 'v1' of https://github.com/DataDog/dd-trace-go:
  Implement DD_PROFILING_OUTPUT_DIR for dev/debug (DataDog#924)
  contrib/go-pg/pg.v10: add INTEGRATION flag check for tests (DataDog#921)
  contrib/go-redis/redis.v8: optimize BeforeProcess and BeforeProcessPipeline (DataDog#920)
  CI: check go.sum is up-to-date (DataDog#918)
  README: Fix go get instructions (DataDog#913)
  internal/log: Improve API for testing (DataDog#916)
  ddtrace/tracer: add support for agent discovery endpoint, feature flags, stats & drops (DataDog#859)
  internal/version: bump to v1.31.0 (DataDog#910)
  CONTRIBUTING.md: add link to contrib/README.md (DataDog#802)
  profiler: Disable agentless mode for WithAPIKey (DataDog#906)
  contrib/Shopify/sarama: fix possible deadlock in WrapAsyncProducer (DataDog#907)
  contrib/database/sql.tracedConn implement driver.SessionResetter (DataDog#908)
  ddtrace/opentracer: consider FollowsFrom references as children (DataDog#905)
  ddtrace/opentracer: add support for opentracing.TracerContextWithSpanExtension (DataDog#855)
  ddtrace/tracer: follow noDebugStack setting when using SetTag with an error (DataDog#900)
  contrib/net/http: add a getter to retrieve original round tripper (DataDog#903)
  ddtrace/tracer: ensure Flush call is synchronous (DataDog#901)
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.

None yet

2 participants