-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add performance test for filelog based kubernetes container logs receiver #2564
Add performance test for filelog based kubernetes container logs receiver #2564
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2564 +/- ##
===========================================
+ Coverage 69.18% 91.31% +22.13%
===========================================
Files 34 429 +395
Lines 1603 21457 +19854
===========================================
+ Hits 1109 19594 +18485
- Misses 420 1394 +974
- Partials 74 469 +395
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
||
// NewFileLogK8sWriter creates a new data sender that will write kubernetes containerd | ||
// log entries to a file, to be tailed by FileLogReceiver and sent to the collector. | ||
func NewFileLogK8sWriter(config string) *FileLogK8sWriter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment to explain what config
must contain.
@@ -31,4 +34,42 @@ func TestMain(m *testing.M) { | |||
testbed.DoTestMain(m, contribPerfResultsSummary) | |||
} | |||
|
|||
// This file is left with no tests as a placeholder for future unstable exe tests | |||
func TestLog10kDPS(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to the stable log_test.go instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I was not sure what exactly unstable
means
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests_unstable_exe/log_test.go
is for testing the unstable executable.
Stanza/filelog receiver previously was part of unstable executable. It was moved to stable
exe yesterday.
02a5e52
to
339dc66
Compare
@tigrannajaryan All fixed, but Ci seems to be unstable Today |
I think there is a linting error (in addition to failing load test, which is probably CircleCI fault). |
@tigrannajaryan I doubt this lint error related to this PR, as all recent PRs have same issue eg. https://app.circleci.com/pipelines/github/open-telemetry/opentelemetry-collector-contrib/10631/workflows/5e23abf9-f769-4d99-908e-c046ea55bbda/jobs/89573
|
@tigrannajaryan I added more tests in this PR and example is available in PR #2606 |
Rebasing from main should help. It was broken. |
testbed/datasenders/k8s.go
Outdated
// NewFileLogK8sWriter creates a new data sender that will write kubernetes containerd | ||
// log entries to a file, to be tailed by FileLogReceiver and sent to the collector. | ||
// | ||
// config is an OTC config appended to the receivers section after executing fmt.Sprintf on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is OTC? If it refers to collector just use Collector or Otel Collector or Otelcol. We don't normally use OTC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will use Otelcol
then
@sumo-drosiek The latest release of This should be a very straightforward change from using the term |
2662e93
to
c75f8ac
Compare
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com> Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
c75f8ac
to
c945b11
Compare
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/parser/json" | ||
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/parser/regex" | ||
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/parser/severity" | ||
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/parser/time" | ||
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/transformer/metadata" | ||
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/transformer/restructure" | ||
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/transformer/router" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was unable to make linter happy with comment above transformer
section. At least one of two linters has been always raising some issues:
Check License finished successfully
internal/stanza/register.go: Import groups are not in the proper order: ["Third party" "Third party"]
or
register.go:22: File is not `goimports`-ed with -local github.com/open-telemetry/opentelemetry-collector-contrib (goimports)
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/parser/time"
or
register.go:23: File is not `gofmt`-ed with `-s` (gofmt)
I tried three different approaches
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/parser/time"
// comment here
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/transformer/metadata"
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/parser/time"
// comment here
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/transformer/metadata"
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/parser/time"
// comment here (preceding line is tab indented)
_ "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/transformer/metadata"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to split into two groups - looks good to me like this.
@tigrannajaryan @djaglowski Everything addressed, CI is green :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @sumo-drosiek |
Ensure that the receiver finishes all ongoing requests, and does not accept any new request after shutdown is finished. Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Add performance test for filelog based kubernetes container logs receiver
This PR contains one performance test (for kubernetes containerd logs with format autodetection)
Link to tracking Issue:
#2266
Testing:
Perf tests
Documentation:
N/A