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

Log from activity interceptor #22

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

sevein
Copy link
Member

@sevein sevein commented Sep 4, 2024

In response to artefactual-sdps/enduro#1015 (comment). This approach makes sure that we always log the worker activity execution event regardless whether the activity implementor did any logging, and this is true even for internal activities like internalSessionCreationActivity that the application developer doesn't own.

This:

[enduro-a3m-worker] 2024-09-04T08:41:22.920Z	V(1)	enduro-a3m-worker	activities/download.go:44	Executing DownloadActivity	{"ActivityID": "14", "ActivityType": "download-activity", "Key": "small.zip", "WatcherName": "dev-minio"}

Becomes:

[enduro-a3m-worker] 2024-09-04T08:41:22.920Z	V(1)	enduro-a3m-worker	temporal/log.go:84	Executing activity.	{"ActivityID": "14", "ActivityType": "download-activity"}

The main difference is that we can't include the file name or line number (from the goroutine stack) because that information is only available to the callee - not sure if that's enough to reject this idea. This is also the case in the traces that we're emitting with the trace interceptor.

Copy link
Contributor

@djjuhasz djjuhasz left a comment

Choose a reason for hiding this comment

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

Looks okay to me. 👍

@sevein sevein merged commit 8b54fad into main Sep 4, 2024
6 checks passed
@sevein sevein deleted the dev/temporal-activity-interceptor-logging branch September 4, 2024 17:09
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