Skip to content

Add zap integration#958

Closed
ribice wants to merge 12 commits intomasterfrom
zap
Closed

Add zap integration#958
ribice wants to merge 12 commits intomasterfrom
zap

Conversation

@ribice
Copy link
Copy Markdown
Contributor

@ribice ribice commented Jan 25, 2025

TODO:

@ribice ribice requested a review from cleptric January 25, 2025 19:18
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 25, 2025

Codecov Report

❌ Patch coverage is 57.37052% with 107 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.41%. Comparing base (2e92c62) to head (7e3c24e).
⚠️ Report is 146 commits behind head on master.

Files with missing lines Patch % Lines
zap/core.go 45.94% 65 Missing and 15 partials ⚠️
zap/sentryzap.go 63.82% 16 Missing and 1 partial ⚠️
zap/field.go 0.00% 4 Missing ⚠️
zap/frame_matcher.go 71.42% 4 Missing ⚠️
zap/util.go 94.73% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #958      +/-   ##
==========================================
- Coverage   83.63%   82.41%   -1.23%     
==========================================
  Files          49       54       +5     
  Lines        5139     5390     +251     
==========================================
+ Hits         4298     4442     +144     
- Misses        684      775      +91     
- Partials      157      173      +16     

☔ 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.

@aliBordbar1992
Copy link
Copy Markdown

hey
is this PR expected to be merged in near future?
or is it recommended to switch to another supported logging library that is already integrated with sentry?

@giortzisg
Copy link
Copy Markdown
Contributor

Hey @aliBordbar1992,
The PR only includes issue events and not logs, so it stills needs additional work. I would say for now it's better to switch to one of the supported integrations.

@giortzisg
Copy link
Copy Markdown
Contributor

We made the decision to not support issue event conversion for zap, to avoid confusion and keep things simpler. Furthermore, converting logs to issues in Go behaves weirdly when not attaching stacktraces, so all captured error logs under the same trace would be grouped under the same errors.String type in the Sentry UI, so the recommended way to capture issues would be using CaptureException. However we will still support logs for zap.

@giortzisg giortzisg closed this Jan 29, 2026
@github-actions
Copy link
Copy Markdown

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Breaking Changes 🛠

  • refactor Telemetry Processor to use TelemetryItem instead of ItemConvertible by giortzisg in #1180
    • remove ToEnvelopeItem from single log items
    • rename TelemetryBuffer to Telemetry Processor to adhere to spec
    • remove unsed ToEnvelopeItem(dsn) from Event.
  • Remove MaxBreadcrumbs hard limit and change default to 100 by giortzisg in #1106

New Features ✨

  • Add metric support by aldy505 in #1151
    • support for three metric methods (counter, gauge, distribution)
    • custom metric units
    • unexport batchlogger
  • Refactor log serialization to match docs by giortzisg in #1169
  • Add propagateTraceparent option by giortzisg in #1161
  • Http client integration by aldy505 in #876
  • Disable Telemetry Buffer by default by giortzisg in #1149
  • Drop rate-limited events by giortzisg in #1138
  • Add telemetry scheduler by giortzisg in #1107
  • Ignore 404 status codes by giortzisg in #1122
  • Change sentry.origin for logs by giortzisg in #1121
  • Add new envelope transport by giortzisg in #1094
  • Add ring buffers by giortzisg in #1093
  • Properly support error capturing by giortzisg in #1075
  • Add TraceIgnoreStatusCodes option by giortzisg in #1089

Bug Fixes 🐛

  • (logs) Don't gate user behind SendDefaultPII by AbhiPrasad in #1032
  • (otel) Prefer http route over http target for span description by OrkhanAlikhanov in #1002
  • Scheduler should check for ready to flush buffers by giortzisg in #1143
  • Provide init ctx to eventHandler by giortzisg in #1133
  • Check ptr value for visited exception chains by giortzisg in #1132
  • Add default name to patch coverage by giortzisg in #1124
  • Add fallback on non hashable errors by giortzisg in #1113
  • Logs should not pass from processEvent by giortzisg in #1109
  • Use correct Level signature for logs by giortzisg in #1034

Internal Changes 🔧

Deps

  • Bump actions/create-github-app-token from 2.1.4 to 2.2.1 by dependabot in #1164
  • Bump golangci/golangci-lint-action from 8.0.0 to 9.2.0 by dependabot in #1165
  • Bump codecov/codecov-action from 5.5.1 to 5.5.2 by dependabot in #1163
  • Bump actions/checkout from 5 to 6 by dependabot in #1162
  • Bump actions/cache from 4 to 5 by dependabot in #1166
  • Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.3 in /iris by dependabot in #1152
  • Bump golang.org/x/net to 0.38.0 by giortzisg in #1126
  • Bump github/codeql-action from 3 to 4 by dependabot in #1125
  • Bump actions/create-github-app-token from 2.0.6 to 2.1.4 by dependabot in #1098
  • Bump actions/setup-go from 5 to 6 by dependabot in #1097
  • Bump actions/checkout from 4 to 5 by dependabot in #1099
  • Bump codecov/codecov-action from 5.4.3 to 5.5.1 by dependabot in #1100
  • Bump github.com/gofiber/fiber/v2 from 2.52.5 to 2.52.9 in /fiber by dependabot in #1067
  • Bump actions/create-github-app-token from 1.12.0 to 2.0.6 by dependabot in #1021
  • Bump golangci/golangci-lint-action from 7.0.0 to 8.0.0 by dependabot in #1020
  • Bump codecov/codecov-action from 5.4.2 to 5.4.3 by dependabot in #1022
  • Update github.com/stretchr/testify to v1.8.4 by hazzik in #988
  • Bump actions/create-github-app-token from 1.11.5 to 1.12.0 by dependabot in #987
  • Bump codecov/codecov-action from 5.4.0 to 5.4.2 by dependabot in #1005
  • Bump golangci/golangci-lint-action from 6.2.0 to 6.5.0 by dependabot in #975
  • Bump codecov/codecov-action from 5.3.1 to 5.4.0 by dependabot in #974
  • Bump actions/create-github-app-token from 1.11.2 to 1.11.5 by dependabot in #973
  • Bump codecov/codecov-action from 5.1.2 to 5.3.1 by dependabot in #962
  • Bump golangci/golangci-lint-action from 6.1.1 to 6.2.0 by dependabot in #961
  • Bump actions/create-github-app-token from 1.11.1 to 1.11.2 by dependabot in #963

Release

  • Fix changelog-preview permissions by BYK in #1181
  • Switch from action-prepare-release to Craft by BYK in #1167

Other

  • (repo) Add Claude Code settings with basic permissions by philipphofmann in #1175
  • Update release and changelog-preview workflows by giortzisg in #1177
  • Bump echo to 4.10.1 by giortzisg in #1174
  • Prepare 0.41.0 by giortzisg in #1172
  • Prepare 0.40.0 by giortzisg in #1150
  • Prepare 0.39.0 by giortzisg in #1144
  • Prepare 0.38.0 by giortzisg in #1137
  • Prepare 0.37.0 by giortzisg in #1134
  • X handle update by cleptric in #1130
  • Set patch coverage to informational by giortzisg in #1123
  • Create debuglog package by giortzisg in #1105
  • Update pull request template by dingsdax in #1086
  • Rename bulider.go to builder.go by AbhiPrasad in #1037

Other

  • Add zap integration by ribice in #958
  • release: 0.42.0 by giortzisg in 21004229
  • release: 0.41.0 by getsentry-bot in 87e197c2
  • release: 0.40.0 by getsentry-bot in f3fc5645
  • release: 0.39.0 by getsentry-bot in a3626823
  • release: 0.38.0 by getsentry-bot in eb9fd9f8
  • release: 0.37.0 by getsentry-bot in 1cd6b6ac
  • release: 0.36.2 by getsentry-bot in 2aecd6ed
  • Prepare 0.36.2 by giortzisg in #1119
  • fix context propagation for logs by giortzisg in #1118
  • release: 0.36.1 by getsentry-bot in 1bdc7aaa
  • Prepare 0.36.1 by giortzisg in #1114
  • release: 0.36.0 by getsentry-bot in fe877a9b
  • Prepare 0.36.0 by giortzisg in #1110
  • Run tests on Go 1.25 and remove Go 1.22 by cleptric in #1103
  • release: 0.35.3 by getsentry-bot in 5feaeafa
  • Prepare 0.35.3 by giortzisg in #1084
  • add missing rate limit categories by giortzisg in #1082
  • Update ISSUE_TEMPLATE by cleptric in #1079
  • release: 0.35.2 by getsentry-bot in febe2bad
  • Prepare 0.35.2 by giortzisg in #1078
  • Fix otel span being created as a transaction by giortzisg in #1073
  • Run test pipeline once by giortzisg in #1072
  • Fix flaky tests by giortzisg in #1071

Plus 43 more


🤖 This preview updates automatically when you update the PR.

@giortzisg
Copy link
Copy Markdown
Contributor

@aliBordbar1992 we just released the zap integration under 0.43.0

@giortzisg giortzisg deleted the zap branch April 15, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Issue type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants