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

Filter Temporal exit errors from traces #18777

Merged
merged 3 commits into from
Nov 1, 2022

Conversation

jdpgrailsdev
Copy link
Contributor

What

  • Improve APM tracing by reducing/removing expected errors from tracing

How

Recommended reading order

  1. TemporalSdkInterceptor.java

Tests

  • Added unit tests for new interceptor
  • Project builds locally
  • All tests pass

@github-actions github-actions bot added area/platform issues related to the platform area/worker Related to worker labels Nov 1, 2022

class DummySpan implements MutableSpan {

@SuppressWarnings("PMD")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: could we be more specific here. I wonder what is the error here since ti looks that the variable is being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@colesnodgrass Any insight as to why this suppression was added? @benmoriceau This was a copy/extraction from the existing test, so I don't have the context.

Copy link
Member

Choose a reason for hiding this comment

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

I meant to clean this up before committing it. Since there was a 30 minute turn around time between making a change and getting it into dev to verify it, I didn't want the build failing due to a PMD issue (making that 30 minutes even longer). Once things were working as expected I should have fixed this to suppress only the specific issue (if any even exist anymore).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did some testing locally and this suppression does not appear to be necessary. I've removed it and will verify that the PR builds without issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it could be removed safely.


@Override
public Collection<? extends MutableSpan> onTraceComplete(final Collection<? extends MutableSpan> trace) {
final var filtered = new ArrayList<MutableSpan>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit; we could use a kotlin/scala like syntax here by using val. It is not standard so feel free to ignore it.

@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets November 1, 2022 15:27 Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets November 1, 2022 15:49 Inactive
@jdpgrailsdev jdpgrailsdev merged commit 354db21 into master Nov 1, 2022
@jdpgrailsdev jdpgrailsdev deleted the jonathan/intercept-temporal-exit-error branch November 1, 2022 16:31
natalyjazzviolin pushed a commit that referenced this pull request Nov 3, 2022
* Filter Temporal exit errors from traces

* Remove unnecessary PMD suppression

* Formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/worker Related to worker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants