-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Initial OSS logging adapter for http #2008
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
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a8bf0b0
initial logging stack for http
mattdholloway 4a2f8ed
Merge branch 'main' of https://github.com/github/github-mcp-server in…
mattdholloway ba9d315
Merge branch 'main' of https://github.com/github/github-mcp-server in…
mattdholloway cbf99e7
add metrics adapter
mattdholloway cc5b8e7
Merge branch 'main' into add-logging-stack-v2
mattdholloway 77f6e57
fix linter issues
mattdholloway 3bbfaa0
make log fields generic
mattdholloway dd57d84
Merge branch 'main' into add-logging-stack-v2
mattdholloway 2a20a2a
Update pkg/github/server_test.go
mattdholloway 1648775
Merge branch 'main' into add-logging-stack-v2
mattdholloway 7c5ea0a
Remove unused SlogMetrics adapter
mattdholloway 121daa3
Update pkg/github/dependencies.go
mattdholloway 39445b0
fmt
mattdholloway f7d3a75
Merge branch 'main' into add-logging-stack-v2
mattdholloway 30b2952
Merge branch 'main' into add-logging-stack-v2
mattdholloway c0a68f5
change to use slog
mattdholloway 457f64d
address feedback
mattdholloway f94b729
Merge branch 'main' into add-logging-stack-v2
mattdholloway e31ea3b
rename noop adapter to noop sink
mattdholloway 095d9f2
Update pkg/http/server.go
mattdholloway 1ae4a03
[WIP] [WIP] Address feedback on OSS logging adapter for http implemen…
Copilot 2b18639
replace nil with stubs
mattdholloway a7778ca
Merge branch 'main' into add-logging-stack-v2
mattdholloway File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package metrics | ||
|
|
||
| import "time" | ||
|
|
||
| // Metrics is a backend-agnostic interface for emitting metrics. | ||
| // Implementations can route to DataDog, log to slog, or discard (noop). | ||
| type Metrics interface { | ||
| Increment(key string, tags map[string]string) | ||
| Counter(key string, tags map[string]string, value int64) | ||
| Distribution(key string, tags map[string]string, value float64) | ||
| DistributionMs(key string, tags map[string]string, value time.Duration) | ||
| WithTags(tags map[string]string) Metrics | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package metrics | ||
|
|
||
| import "time" | ||
|
|
||
| // NoopMetrics is a no-op implementation of the Metrics interface. | ||
| type NoopMetrics struct{} | ||
|
|
||
| var _ Metrics = (*NoopMetrics)(nil) | ||
|
|
||
| // NewNoopMetrics returns a new NoopMetrics. | ||
| func NewNoopMetrics() *NoopMetrics { | ||
| return &NoopMetrics{} | ||
| } | ||
|
|
||
| func (n *NoopMetrics) Increment(_ string, _ map[string]string) {} | ||
| func (n *NoopMetrics) Counter(_ string, _ map[string]string, _ int64) {} | ||
| func (n *NoopMetrics) Distribution(_ string, _ map[string]string, _ float64) {} | ||
| func (n *NoopMetrics) DistributionMs(_ string, _ map[string]string, _ time.Duration) {} | ||
| func (n *NoopMetrics) WithTags(_ map[string]string) Metrics { return n } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.