Skip to content

Conversation

iamdanfox
Copy link
Contributor

@iamdanfox iamdanfox commented Aug 2, 2021

Before this PR

A sourcegraph search shows the only usages of AsyncSlf4jSpanObserver are in archived repos (so no longer writeable), or abandoned personal copies of http-remoting.

There is however one usage in tritium's tests: https://github.com/palantir/tritium/blob/14084bccbaf34133af38d5da2c52b136e0c0b9aa/tritium-tracing/src/test/java/com/palantir/tritium/tracing/TracingInvocationEventHandlerTest.java#L71, which I'm deleting here palantir/tritium#1172

I'd like to delete the parts of tracing-java's API that we no longer use so that any attempt to try out different internals (e.g. OpenTelemetry) is a bit easier.

After this PR

==COMMIT_MSG==
Delete AsyncSlf4jSpanObserver - internally we construct a SpanObserver which uses log4j2 to ensure that spans are serialized and logged without blocking threads that produce spans.
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Aug 2, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Delete AsyncSlf4jSpanObserver - internally we construct a SpanObserver which uses log4j2 to ensure that spans are serialized and logged without blocking threads that produce spans. This also means tracing-java no longer transitively provides jackson dependencies.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from tpetracca August 2, 2021 18:20
@iamdanfox iamdanfox force-pushed the dfox/delete-AsyncSlf4jSpanObserver branch from a726197 to 14d311a Compare August 2, 2021 18:20
@carterkozak
Copy link
Contributor

Does this allow us to update the slf4j dependency in the tracing module from compile (api) to implementation?

implementation project(':tracing-api')
implementation 'com.google.guava:guava'
implementation 'com.palantir.safe-logging:preconditions'
implementation "org.slf4j:slf4j-api"
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be necessary after the safe-logger migration, just in testImplementation, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, after merging in develop this disappeared

@iamdanfox iamdanfox changed the title Delete AsyncSlf4jSpanObserver [stacked] Delete AsyncSlf4jSpanObserver Aug 2, 2021
@iamdanfox iamdanfox changed the base branch from develop to dfox/delete-async-tracer August 2, 2021 18:28
@iamdanfox iamdanfox force-pushed the dfox/delete-AsyncSlf4jSpanObserver branch from 702f4d2 to 2022d31 Compare August 2, 2021 18:39
@iamdanfox iamdanfox changed the base branch from dfox/delete-async-tracer to develop August 2, 2021 18:40
@iamdanfox iamdanfox changed the title [stacked] Delete AsyncSlf4jSpanObserver Delete AsyncSlf4jSpanObserver Aug 2, 2021
com.fasterxml.jackson.core:jackson-annotations:2.12.3 (18 constraints: fa20d0ea)
com.fasterxml.jackson.core:jackson-core:2.12.3 (18 constraints: f5617cda)
com.fasterxml.jackson.core:jackson-databind:2.12.3 (26 constraints: 8cf4d2b4)
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.3 (4 constraints: 1e3f528b)
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

@bulldozer-bot bulldozer-bot bot merged commit 1e9d9df into develop Aug 2, 2021
@bulldozer-bot bulldozer-bot bot deleted the dfox/delete-AsyncSlf4jSpanObserver branch August 2, 2021 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants