Skip to content
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

Ignore the problem of self-reported spans when multi-tenant enabled #3787

Merged
merged 3 commits into from
Jul 1, 2022

Conversation

esnible
Copy link
Contributor

@esnible esnible commented Jun 29, 2022

Signed-off-by: Ed Snible snible@us.ibm.com

If the experimental tenancy feature is enabled, every self-reported span generates two error level log entries with full stack traces.

This PR causes Jaeger to log missing tenancy at debug level.

The goal is to mitigate the problem of self-reports while we focus on adding tenancy to the query APIs.

See #3750 (comment)

@esnible esnible marked this pull request as ready for review June 29, 2022 14:00
@esnible esnible requested a review from a team as a code owner June 29, 2022 14:00
@esnible esnible requested a review from pavolloffay June 29, 2022 14:00
@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #3787 (de43533) into main (5beb965) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #3787   +/-   ##
=======================================
  Coverage   97.59%   97.59%           
=======================================
  Files         288      288           
  Lines       16774    16778    +4     
=======================================
+ Hits        16370    16374    +4     
  Misses        319      319           
  Partials       85       85           
Impacted Files Coverage Δ
cmd/agent/app/reporter/grpc/reporter.go 100.00% <100.00%> (ø)
cmd/collector/app/handler/grpc_handler.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5beb965...de43533. Read the comment docs.

yurishkuro
yurishkuro previously approved these changes Jun 29, 2022
@yurishkuro yurishkuro enabled auto-merge (squash) June 29, 2022 14:08
r.logger.Error("Could not send spans over gRPC", zap.Error(err))
stat, ok := status.FromError(err)
if ok && stat.Code() == codes.PermissionDenied && stat.Message() == "missing tenant header" {
r.logger.Debug("Could not send spans over gRPC", zap.Error(err))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth distinguishing the error messages a bit more, not just by the error level.

auto-merge was automatically disabled June 29, 2022 16:35

Head branch was pushed to by a user without write access

Comment on lines 209 to 210
conn, err := grpc.Dial(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()))
//nolint:staticcheck // don't care about errors
defer conn.Close()
require.NoError(t, err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
conn, err := grpc.Dial(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()))
//nolint:staticcheck // don't care about errors
defer conn.Close()
require.NoError(t, err)
conn, err := grpc.Dial(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()))
require.NoError(t, err)
defer func() { require.NoError(t, conn.Close()) }()

require.NoError(t, err)
rep := NewReporter(conn, nil, zap.NewNop())

tm := time.Unix(158, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not time.Now()?

Signed-off-by: Ed Snible <snible@us.ibm.com>
Signed-off-by: Ed Snible <snible@us.ibm.com>
Signed-off-by: Ed Snible <snible@us.ibm.com>
@pavolloffay pavolloffay merged commit 8c2e162 into jaegertracing:main Jul 1, 2022
@esnible esnible deleted the less-tenancy-logging branch July 1, 2022 16:47
albertteoh pushed a commit to albertteoh/jaeger that referenced this pull request Jul 13, 2022
…aegertracing#3787)

* Log missing tenancy at debug level

Signed-off-by: Ed Snible <snible@us.ibm.com>

* Debug message and code coverage

Signed-off-by: Ed Snible <snible@us.ibm.com>

* Simplify test

Signed-off-by: Ed Snible <snible@us.ibm.com>
Signed-off-by: Albert Teoh <see.kwang.teoh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants