Skip to content

Conversation

giortzisg
Copy link
Contributor

Description

According to the docs here https://develop.sentry.dev/sdk/telemetry/logs/#sdk-integration-attributes, sentry.origin should only be set for integrations.

@giortzisg giortzisg requested a review from cleptric June 17, 2025 09:22
@giortzisg giortzisg self-assigned this Jun 17, 2025
@giortzisg giortzisg added Bug Issue type Improvement Issue type and removed Bug Issue type labels Jun 17, 2025
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.44%. Comparing base (4c908b7) to head (5ef1b34).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1038      +/-   ##
==========================================
- Coverage   85.48%   85.44%   -0.05%     
==========================================
  Files          55       55              
  Lines        5499     5497       -2     
==========================================
- Hits         4701     4697       -4     
- Misses        653      655       +2     
  Partials      145      145              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cleptric cleptric requested a review from Copilot June 17, 2025 10:59
@cleptric cleptric merged commit e75b120 into master Jun 17, 2025
17 checks passed
@cleptric cleptric deleted the logs-sentry-origin branch June 17, 2025 10:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the sentry.origin attribute from the logger so that origin is only set for integrations, in line with Sentry’s telemetry docs.

  • Removed sentry.origin from log.go when emitting logs.
  • Updated tests in log_test.go to no longer expect sentry.origin.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
log.go Deleted the line setting sentry.origin in log()
log_test.go Removed sentry.origin expectations in three tests
Comments suppressed due to low confidence (2)

log.go:146

attrs["sentry.origin"] = Attribute{Value: "auto.logger.log", Type: "string"}

log_test.go:48

  • [nitpick] Consider adding an explicit assertion that sentry.origin is not present in the attributes map to ensure this removal is enforced.
"sentry.sdk.version":    {Value: "0.10.0", Type: "string"},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Issue type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants