-
Notifications
You must be signed in to change notification settings - Fork 1
enhance goner/zap with OpenTelemetry #70
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r log, meter, and tracer providers - Update config keys for gRPC and HTTP log exporters - Implement proper shutdown sequence for log, meter, and tracer providers - Add ForceFlush call before Shutdown for proper data handling - Optimize logger configuration in helper structs
- Integrate OpenTelemetry logging bridge - Add configuration options for OpenTelemetry logging - Implement conditional OpenTelemetry support based on configuration- Update dependencies for OpenTelemetry integration
- Create new example for OpenTelemetry log collection - Set up OTel collector and configure for log ingestion- Implement basic logging in Go using OTel SDK - Include configuration files and README for setup instructions
…lper for independent implementation, avoiding circular dependencies - Add isOtelLogLoadedProvider struct to handle IsOtelLogLoaded functionality - Implement Provide method for isOtelLogLoadedProvider
- Update go.uber.org/mock from v0.5.1 to v0.5.2 in multiple modules - This change affects various components including apollo, balancer, cmux, consul, deepseek, etcd, and several examples
- Add CtxLogger interface in g/logger.go for context-based logging - Implement ctxLogger in zap/ctx_logger.go to extract trace ID from context - Refactor gone_logger.go to use new ctxLogger - Update load.go to register ctxLogger as default CtxLogger - Remove sugarProvider and related code
- Rename mock_http_test.go to http_mock.go- Add comprehensive mock implementations for various gin interfaces - Update mock generation command in the file header
- Add support for retrieving trace IDs from OpenTelemetry context - Update go.mod files to include necessary dependencies - Modify Gin and gRPC middlewares to check for OpenTelemetry trace IDs - Fall back to existing trace ID retrieval methods if OpenTelemetry is not used
…er/gid, which can be used separately to reduce dependencies. - Add new tracer implementations using goid and gls libraries - Improve performance with high-performance gid implementation - Update loader and interface to support new tracer components - Add tests for new tracer implementations - Update documentation and README with new usage instructions
- Add go.uber.org/mock v0.5.2 to multiple modules - Add github.com/gone-io/goner/tracer/gid and gls to go.mod - Update go.mod with new dependencies and remove commented replacements
- Add OpenTelemetry tracing to the log collection example - Implement context-based logging with trace ID - Update configuration to enable trace logging - Refactor logger initialization and error handling - Optimize trace encoder to prevent duplicate trace IDs
- Update README.md with new features and configuration options - Add detailed guide for integrating with OpenTelemetry - Remove unused code and simplify examples - Update Chinese README with similar changes
…e framework - Create new directory for Zap logger example - Add main.go file with example usage of Zap logger - Include README.md and README_CN.md files with detailed documentation - Provide examples of using native Zap logger and Gone logger interface - Demonstrate custom encoder implementation - Show integration with tracer
…mples - Add log collection example using OpenTelemetry and Zap- Add distributed tracing example over HTTP and gRPC protocols - Update existing tracer-over-oltp-http example - Add Chinese and English README files for new examples
- Remove GetTraceIdFromCtx function - Use trace.SpanContextFromContext to get span context - Check for valid trace ID using HasTraceID - Add unit tests for ctxLogger.Ctx method - Update mock tracer implementation - Adjust trace encoder tests
- Remove unused dependencies in various go.mod files - Add IsLoaded function in g/help.go to track loaded Goner instances - Update otel/helper.go to use IsLoaded for checking if helper is already loaded- Modify examples to reflect changes in dependency structure
Codecov ReportAttention: Patch coverage is
🚀 New features to boost your workflow:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
g.CtxLogger
for goner/g