Streaming Exporters Support#203
Open
mbolt35 wants to merge 1 commit into
Open
Conversation
mbolt35
commented
Jun 25, 2026
Collaborator
- Update opencost version
- Add streaming exporters support via environment variable
- Add compression for streaming exporters
thomasvn
reviewed
Jun 26, 2026
| // if the level provided is invalid (explicitly set, but not in the 0-9 range), | ||
| // the more "acceptable" default for our use-case is speed. | ||
| if !level.IsValid() { | ||
| return exporter.ExportCompressionLevelBestSpeed |
Member
There was a problem hiding this comment.
Maybe a debug-level log if the user provided an invalid compression level?
thomasvn
reviewed
Jun 26, 2026
Comment on lines
+97
to
+98
| pipelineConfig.Streaming = ke.config.StreamingExportEnabled | ||
| pipelineConfig.Compression = ke.config.StreamingExportCompressionLevel |
Member
There was a problem hiding this comment.
If the user did enable streaming, add a log?
Suggested change
| pipelineConfig.Streaming = ke.config.StreamingExportEnabled | |
| pipelineConfig.Compression = ke.config.StreamingExportCompressionLevel | |
| pipelineConfig.Streaming = ke.config.StreamingExportEnabled | |
| pipelineConfig.Compression = ke.config.StreamingExportCompressionLevel | |
| if ke.config.StreamingExportEnabled { | |
| log.Infof("Streaming export enabled with compression level: %d", ke.config.StreamingExportCompressionLevel) | |
| } |
thomasvn
reviewed
Jun 26, 2026
|
|
||
| for _, c := range cases { | ||
| t.Run(fmt.Sprintf("streaming and compression config stream=%s level=%s", c.isStreaming, c.compressionLevel), func(t *testing.T) { | ||
| tempDir := os.TempDir() |
Member
There was a problem hiding this comment.
Suggested change
| tempDir := os.TempDir() | |
| tempDir := t.TempDir() |
thomasvn
approved these changes
Jun 26, 2026
thomasvn
left a comment
Member
There was a problem hiding this comment.
Minor comments about logging, looks good!
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
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.