8000 Add basic Sentry tracing instrumentation by dcramer · Pull Request #4 · dcramer/panelkit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add basic Sentry tracing instrumentation #4

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcramer
Copy link
Owner
@dcramer dcramer commented Jun 16, 2020

No description provided.

src/sentry.tsx Outdated
}
const transaction = (tracingIntegration as any).constructor.getTransaction();
if (!transaction) {
console.warn("startSpan called without transaction");
Copy link
Owner Author

Choose a reason for hiding this comment

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

doesnt need to be a warning as its super common..

i also likely need to add new styles of transactions here. not sure what yet, but maybe when someone presses a tile its a new transaction. will experiment and see what can create value for patterns.

src/hass.tsx Outdated
setTimeout(() => {
this._pendingChanges.delete(payload.id);
}, 1000);
resolve(payload);
} else if (payload.error) {
if (span) {
span.setStatus(SpanStatus.UnknownError);
Copy link
Owner Author

Choose a reason for hiding this comment

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

understanding how to map other systems status codes to our status codes will be a challenge for folks.. going to try an exercise of doing this w/ hass

@dcramer dcramer force-pushed the feat/tracing-instrumentation branch from 43f1159 to c2d6c66 Compare June 16, 2020 18:00
8000
console.warn("startSpan called without tracing integration");
return null;
}
const transaction = (tracingIntegration as any).constructor.getTransaction();
Copy link
Owner Author

Choose a reason for hiding this comment

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

its not ideal that we have to attach a span to a transaction (aka we cant always return a span)

@dcramer dcramer force-pushed the feat/tracing-instrumentation branch from c2d6c66 to d3d83a6 Compare June 16, 2020 18:27
return transaction.startChild(options);
};

export const startTransaction = (options: {
Copy link
Owner Author

Choose a reason for hiding this comment

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

this doesnt actually seem to work well.. to some degree i wanted to manually bind a transaction but the tracing integration couples them to itself, and theres no real APIs afaik to manage them without the idle helper

Choose a reason for hiding this comment

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

Copy link
Owner Author

Choose a reason for hiding this comment

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

damn - didnt find that one :(

@dcramer dcramer force-pushed the feat/tracing-instrumentation branch from d3d83a6 to 8ece59c Compare June 16, 2020 18:57
@@ -141,6 +143,34 @@ export default class Tile<
}
};

handleOnTouch = async () => {
if (!this.onTouch) return;
Sentry.withScope(async (scope) => {
Copy link
Owner Author

Choose a reason for hiding this comment

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

this isnt actually overriding transaction names for these events, which means we end up with 'panelkit.boot' for all transactions

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
0