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

replace KObjs with KObjSlice #322

Merged
merged 2 commits into from
May 10, 2022
Merged

Conversation

pohly
Copy link

@pohly pohly commented Apr 26, 2022

What this PR does / why we need it:

This makes preparing parameters for a log call run in constant time, regardless of the number of slice entries:

$ $GOPATH/bin/benchstat /tmp/old /tmp/new
name          old time/op    new time/op    delta
KObjs/0-36       178ns ± 1%     156ns ± 3%  -12.01%  (p=0.008 n=5+5)
KObjs/10-36     1.17µs ± 2%    0.16µs ± 4%  -86.71%  (p=0.008 n=5+5)
KObjs/20-36     1.99µs ± 1%    0.15µs ± 3%  -92.21%  (p=0.008 n=5+5)
KObjs/30-36     2.77µs ± 2%    0.15µs ± 4%  -94.45%  (p=0.008 n=5+5)
KObjs/40-36     3.58µs ± 1%    0.15µs ± 2%  -95.83%  (p=0.008 n=5+5)
KObjs/50-36     4.38µs ± 1%    0.16µs ± 1%  -96.44%  (p=0.008 n=5+5)
KObjs/60-36     5.27µs ± 2%    0.15µs ± 3%  -97.08%  (p=0.008 n=5+5)
KObjs/70-36     5.90µs ± 1%    0.15µs ± 4%  -97.40%  (p=0.008 n=5+5)
KObjs/80-36     6.82µs ± 1%    0.15µs ± 5%  -97.76%  (p=0.008 n=5+5)
KObjs/90-36     7.41µs ± 2%    0.15µs ± 2%  -97.92%  (p=0.008 n=5+5)
KObjs/100-36    8.25µs ± 3%    0.15µs ± 2%  -98.17%  (p=0.008 n=5+5)

name          old alloc/op   new alloc/op   delta
KObjs/0-36       48.0B ± 0%     40.0B ± 0%  -16.67%  (p=0.008 n=5+5)
KObjs/10-36       368B ± 0%       40B ± 0%  -89.13%  (p=0.008 n=5+5)
KObjs/20-36       688B ± 0%       40B ± 0%  -94.19%  (p=0.008 n=5+5)
KObjs/30-36     1.07kB ± 0%    0.04kB ± 0%  -96.27%  (p=0.008 n=5+5)
KObjs/40-36     1.33kB ± 0%    0.04kB ± 0%  -96.99%  (p=0.008 n=5+5)
KObjs/50-36     1.84kB ± 0%    0.04kB ± 0%  -97.83%  (p=0.008 n=5+5)
KObjs/60-36     2.10kB ± 0%    0.04kB ± 0%  -98.09%  (p=0.008 n=5+5)
KObjs/70-36     2.35kB ± 0%    0.04kB ± 0%  -98.30%  (p=0.008 n=5+5)
KObjs/80-36     2.74kB ± 0%    0.04kB ± 0%  -98.54%  (p=0.008 n=5+5)
KObjs/90-36     3.12kB ± 0%    0.04kB ± 0%  -98.72%  (p=0.008 n=5+5)
KObjs/100-36    3.25kB ± 0%    0.04kB ± 0%  -98.77%  (p=0.008 n=5+5)

name          old allocs/op  new allocs/op  delta
KObjs/0-36        2.00 ± 0%      2.00 ± 0%     ~     (all equal)
KObjs/10-36       3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
KObjs/20-36       3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
KObjs/30-36       3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
KObjs/40-36       3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
KObjs/50-36       3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
KObjs/60-36       3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
KObjs/70-36       3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
KObjs/80-36       3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
KObjs/90-36       3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
KObjs/100-36      3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Related-to: kubernetes/kubernetes#106945

Special notes for your reviewer:

Release note:

KObjs is deprecated. KObjSlice should be used instead because it has better performance.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 26, 2022
Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

I feel like I am missing why this is better - can you explain in the comments and commit message?

writeStringValue(b, false, fmt.Sprintf("%+v", v))
}
}()
writeValue(b, v.MarshalLog())
Copy link
Member

Choose a reason for hiding this comment

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

This could recurse if the result is itself a Marsahller - should this call a simplified version that doesn't do further expansion?

Copy link
Author

Choose a reason for hiding this comment

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

I was wondering about that myself and came to the conclusion that recursion would be the right thing to do in this case. I don't know why MarshalLog should do this, but if it does, then the returned object is again something that wasn't meant to be logged as-is.

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 not a huge deal, but I would err the other way - MarshalLog should never return something that needs further expansion. I can't see why this would be required but I can see how it would be dangerous.

Copy link
Author

Choose a reason for hiding this comment

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

I'm coming around to that point of view after thinking about what'll happen when MarshalLog (by mistake) returns itself... infinite recursion.

Looks like a good test case for https://github.com/kubernetes/klog/blob/main/test/output.go... will add that.

@thockin thockin self-assigned this Apr 26, 2022
@pohly
Copy link
Author

pohly commented Apr 26, 2022

I feel like I am missing why this is better - can you explain in the comments and commit message?

The overall goal for the PR is to explore overhead of KObjs and whether it is (or can be made) so cheap that we can always call it directly in a logger.V(5).Info("foo", "objects", klog.KObjs(...)) without putting it into an if loggerV := logger.V(5); loggerV.Enabled() block.

Right now, the overhead of KObjs increases with the size of the slice that it gets passed. The new implementation has constant time and is up to 55x faster (see PR description).

If this is a significant enough enhancement, then we need to figure out how we can make the enhanced version of KObjs available. If we simply replace it as done in the PR right now, we break the klog API because the function signature of KObjs changes.

The performance improvement in this microbenchmark seems significant, but in reality KObjs isn't used that much. If we think that this is worth exploring further, then I could try whether applying it to real traces from Kubernetes Prow jobs also shows a difference.

@thockin
Copy link
Member

thockin commented Apr 26, 2022

So before, KObjs(sliceOfSomething) would do 1 allocation for the slice and copy the name/namespace of each element in.

After this PR it holds a copy of the passed slice header, pointing to the same data (should be safe in the context of a single log-line).

The main difference is that MarshalLog() is only called if the log is actually being emitted, in which case it does the same allocation and copy as before, right?

This is exactly what MarshalLog is good for, so not too surprising, but thebenchmark is only half-true. You should compare before with after+MarshalLog() - which should be approx identical, if I understand?

Did I get that right?

@pohly
Copy link
Author

pohly commented Apr 26, 2022

The main difference is that MarshalLog() is only called if the log is actually being emitted, in which case it does the same allocation and copy as before, right?

Correct.

This is exactly what MarshalLog is good for, so not too surprising, but thebenchmark is only half-true. You should compare before with after+MarshalLog()

That depends what you want to benchmark. The benchmark right now simulates the case where a log call does nothing because the verbosity level causes the log entry to be skipped. IMHO that is true for the majority of the log calls in Kubernetes, so it is worth optimizing for this.

which should be approx identical, if I understand?

That's also my expectation. I was briefly trying to include actual output formatting for text output and JSON, but then the benchmark needs to be in a place where it is okay to pull in zapr (i.e. examples).

After considering the risk that comes with breaking the klog API and how unpleasant a klog.KObjs2 would be, I am currently leaning towards documenting that klog.KObjs has overhead even when the result is not used and that therefore it should be used with if loggerV := logger.V(5); loggerV.Enabled(). Perhaps it's even possible to write a logcheck check for this.

@thockin
Copy link
Member

thockin commented Apr 26, 2022 via email

@pohly
Copy link
Author

pohly commented Apr 26, 2022

KObjSlice()

And what about KObjs? Mark it as deprecated with KObjSlice as replacement, without ever removing it in klog/v2?

arg interface{}
}

func (k kobjs) MarshalLog() interface{} {
Copy link
Author

Choose a reason for hiding this comment

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

What I don't like about this implementation is the reliance on support for MarshalLog. A logger which only supports String will not work well.

Would it be better to implement String? But then what should the result of that be? It cannot be the same ["foo/bar", "x/y"] that klog currently prints because it has to be a string, not a slice of strings.

Copy link
Member

Choose a reason for hiding this comment

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

Implement both and document that MarshalLog is the more performant path. Encourage loggers to support it.

Copy link
Author

Choose a reason for hiding this comment

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

Picking MarshalLog over String does not make sense for all loggers. For example, for klog text format, String is better because the goal is readability.

Copy link
Author

Choose a reason for hiding this comment

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

Right now, klog prints pods=[foo/bar x/y] because that is what fmt.Sprintf("%v") produces. I've implemented String so that it returns the same, so the only difference is that there are additional quotation marks: pods="[foo/bar x/y]". This seems reasonable to me.

This means we don't need MarshalLog support in klog.

Copy link
Member

Choose a reason for hiding this comment

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

Picking MarshalLog over String does not make sense for all loggers. For example, for klog text format, String is better because the goal is readability.

I'm not sure I agree. If I implement MarshalLog() I am explicitly expressing a preference. I am not going to accidentally imnplement that for one reason and then find this as a side-effect (which DOES happen with String())

Copy link
Author

Choose a reason for hiding this comment

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

But that's exactly what we did with ObjectRef? It implements String and MarshalLog, and we want klog text output to use String and zapr to use MarshalLog.

Implementing only MarshalLog is a different case. But as we haven't said that logger implementations must support it, a type that does that will work poorly with those which don't support it - I'd prefer to not have such types.

Copy link
Member

Choose a reason for hiding this comment

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

OK, it's a fair point, but I wonder how much of that is "legacy". If we were doing it all from scratch, would we really want to render ObjectRef differently in text vs. structured?

We're kind of trying to read the user's mind here. MarshalLog is pretty unambiguous, and it seems legit to say (for a specific log impl) "If you set --log-format=text we prefer String() methods over MarshalLog() methods. If you set --log-format=struct we prefer MarshalLog() over String()".

But if you implement MarshalLog() which returns a type that also implements MarshalLog(), you should do the recursion yourself. The log impl gives you one chance.

Likewise, if you implement MarshalLog() which returns a type that implements String(), you should call String() yourself.

Copy link
Author

Choose a reason for hiding this comment

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

If we were doing it all from scratch, would we really want to render ObjectRef differently in text vs. structured?

I think so, yes. Those are two different formats with different usages and at least I prefer the more concise pod=default/my-app when looking at the text log.

But if you implement MarshalLog() which returns a type that also implements MarshalLog(), you should do the recursion yourself. The log impl gives you one chance.

You already convinced me of that 😄

Likewise, if you implement MarshalLog() which returns a type that implements String(), you should call String() yourself.

Also true.

The main question that I have right now is: does it make sense for a type to implement only MarshalLog and not String? If yes, then we should support MarshalLog in klog as a fallback when String is not available.

I don't think it makes sense (wouldn't work with all loggers) and therefore MarshalLog support is not needed in klog because it would always use String, but this is debatable. Perhaps someone doesn't care about portability?

@thockin
Copy link
Member

thockin commented Apr 26, 2022

And what about KObjs? Mark it as deprecated with KObjSlice as replacement, without ever removing it in klog/v2?

That's how deprecations work, yeah :)

I'm just saying that there are names that are not TERRIBLY worse.

@pohly
Copy link
Author

pohly commented Apr 27, 2022

@serathius : what do you prefer?

Add KObjSlice as new, recommended variant or document and enforce the if loggerV := logger.V(5); loggerV.Enabled() pattern?

I like KObjSlice. In contrast to the current KObjs it is clear that the untyped parameter must be a slice. The deprecation without removal of KObj also isn't difficult.

@pohly
Copy link
Author

pohly commented Apr 27, 2022

I wonder whether can and/or should use generics for KObjSlice.

I was hoping to get rid of the reflect call. But that part wouldn't work because the parameter needs to be stored in the kobjs struct, at which point we are back at the current code with interface{} and reflect. Go would need generics for structs and methods.

That leaves "clearer API" as the only advantage. Passing a non-slice parameter would be a compile instead of runtime error.

I don't think we can require Go 1.18 for usage of klog. We therefore would have to offer two versions of KObjSlice with conditional compilation, but then the function signature and thus klog API depend on the Go version - that doesn't sound good.

Probably not worth it...

@pohly
Copy link
Author

pohly commented Apr 27, 2022

But that part wouldn't work because the parameter needs to be stored in the kobjs struct, at which point we are back at the current code with interface{} and reflect. Go would need generics for structs and methods.

A struct that stores function pointers for String and MarshalLog and defining those functions inline in the generic KObjSlice could work. But still not worth it?

@pohly
Copy link
Author

pohly commented Apr 27, 2022

I added some more realistic benchmark under examples/benchmark which uses klog.InfoS, klog.V(11).InfoS (does not pass the verbosity threshold) and klog.V(10).InfoS for klog and zapr.

The results where the log call doesn't do any formatting mirrors the micro-benchmark in the PR description: the time is dominated by the time taken by KObjs, so making that constant time is a worthwhile enhancement.

The cases where actual output formatting happens show no regression, but those results are not final yet because I haven't implemented String yet.

name                                             old time/op    new time/op    delta
Output/klog/no-verbosity-check/objects/0-36        2.77µs ± 7%    2.97µs ±10%     ~     (p=0.151 n=5+5)
Output/klog/no-verbosity-check/objects/10-36       10.2µs ± 4%    10.1µs ± 4%     ~     (p=1.000 n=5+5)
Output/klog/no-verbosity-check/objects/20-36       17.7µs ± 5%    17.2µs ± 7%     ~     (p=0.421 n=5+5)
Output/klog/no-verbosity-check/objects/30-36       23.1µs ± 1%    22.4µs ±11%     ~     (p=0.730 n=4+5)
Output/klog/no-verbosity-check/objects/40-36       30.6µs ± 3%    30.1µs ± 4%     ~     (p=0.222 n=5+5)
Output/klog/no-verbosity-check/objects/50-36       39.2µs ± 2%    39.4µs ± 4%     ~     (p=0.841 n=5+5)
Output/klog/no-verbosity-check/objects/60-36       45.3µs ± 4%    45.2µs ± 6%     ~     (p=1.000 n=5+5)
Output/klog/no-verbosity-check/objects/70-36       54.1µs ± 2%    54.0µs ± 4%     ~     (p=1.000 n=5+5)
Output/klog/no-verbosity-check/objects/80-36       60.5µs ± 5%    61.6µs ± 4%     ~     (p=0.548 n=5+5)
Output/klog/no-verbosity-check/objects/90-36       65.2µs ± 4%    65.8µs ±10%     ~     (p=0.310 n=5+5)
Output/klog/no-verbosity-check/objects/100-36      75.4µs ± 3%    73.2µs ± 7%     ~     (p=0.421 n=5+5)
Output/klog/pass-verbosity-check/objects/0-36      2.81µs ± 4%    2.96µs ± 4%   +5.26%  (p=0.032 n=5+5)
Output/klog/pass-verbosity-check/objects/10-36     10.3µs ± 3%    10.4µs ± 4%     ~     (p=0.310 n=5+5)
Output/klog/pass-verbosity-check/objects/20-36     17.1µs ± 4%    17.5µs ± 4%     ~     (p=0.310 n=5+5)
Output/klog/pass-verbosity-check/objects/30-36     23.8µs ± 8%    24.8µs ± 5%     ~     (p=0.421 n=5+5)
Output/klog/pass-verbosity-check/objects/40-36     29.7µs ± 5%    31.5µs ± 6%     ~     (p=0.056 n=5+5)
Output/klog/pass-verbosity-check/objects/50-36     39.1µs ± 3%    39.6µs ± 2%     ~     (p=0.310 n=5+5)
Output/klog/pass-verbosity-check/objects/60-36     46.1µs ± 2%    46.3µs ± 5%     ~     (p=1.000 n=5+5)
Output/klog/pass-verbosity-check/objects/70-36     54.9µs ± 3%    53.2µs ± 6%     ~     (p=0.222 n=5+5)
Output/klog/pass-verbosity-check/objects/80-36     60.6µs ± 4%    61.2µs ± 3%     ~     (p=0.690 n=5+5)
Output/klog/pass-verbosity-check/objects/90-36     67.3µs ± 8%    68.1µs ± 7%     ~     (p=0.841 n=5+5)
Output/klog/pass-verbosity-check/objects/100-36    73.9µs ± 5%    75.4µs ± 5%     ~     (p=0.690 n=5+5)
Output/klog/fail-verbosity-check/objects/0-36       290ns ± 2%     288ns ± 2%     ~     (p=0.421 n=5+5)
Output/klog/fail-verbosity-check/objects/10-36     1.34µs ± 3%    0.29µs ± 3%  -78.68%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/20-36     2.23µs ± 1%    0.29µs ± 4%  -87.24%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/30-36     3.14µs ± 1%    0.28µs ± 4%  -91.07%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/40-36     3.95µs ± 2%    0.28µs ± 3%  -92.90%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/50-36     4.86µs ± 1%    0.28µs ± 4%  -94.15%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/60-36     5.69µs ± 2%    0.28µs ± 2%  -94.99%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/70-36     6.46µs ± 1%    0.28µs ± 2%  -95.71%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/80-36     7.44µs ± 1%    0.28µs ± 3%  -96.23%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/90-36     8.10µs ± 2%    0.28µs ± 3%  -96.54%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/100-36    8.98µs ± 1%    0.27µs ± 4%  -96.94%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/0-36        5.34µs ± 5%    5.26µs ± 6%     ~     (p=0.841 n=5+5)
Output/zapr/no-verbosity-check/objects/10-36       8.20µs ± 9%    7.87µs ± 7%     ~     (p=0.222 n=5+5)
Output/zapr/no-verbosity-check/objects/20-36       10.5µs ± 2%    10.6µs ± 4%     ~     (p=0.548 n=5+5)
Output/zapr/no-verbosity-check/objects/30-36       12.7µs ± 5%    12.8µs ± 6%     ~     (p=1.000 n=5+5)
Output/zapr/no-verbosity-check/objects/40-36       15.5µs ± 3%    15.1µs ± 5%     ~     (p=0.222 n=5+5)
Output/zapr/no-verbosity-check/objects/50-36       17.5µs ± 4%    17.6µs ± 5%     ~     (p=0.690 n=5+5)
Output/zapr/no-verbosity-check/objects/60-36       20.3µs ± 4%    19.6µs ± 9%     ~     (p=0.222 n=5+5)
Output/zapr/no-verbosity-check/objects/70-36       21.5µs ± 8%    20.9µs ± 5%     ~     (p=0.548 n=5+5)
Output/zapr/no-verbosity-check/objects/80-36       23.9µs ± 8%    24.6µs ± 4%     ~     (p=0.548 n=5+5)
Output/zapr/no-verbosity-check/objects/90-36       26.6µs ± 8%    27.0µs ±10%     ~     (p=0.548 n=5+5)
Output/zapr/no-verbosity-check/objects/100-36      28.7µs ± 2%    27.8µs ± 4%     ~     (p=0.056 n=5+5)
Output/zapr/pass-verbosity-check/objects/0-36      5.37µs ± 3%    5.27µs ± 5%     ~     (p=0.310 n=5+5)
Output/zapr/pass-verbosity-check/objects/10-36     8.10µs ± 4%    8.01µs ± 3%     ~     (p=0.548 n=5+5)
Output/zapr/pass-verbosity-check/objects/20-36     10.8µs ± 5%    10.3µs ± 4%     ~     (p=0.151 n=5+5)
Output/zapr/pass-verbosity-check/objects/30-36     12.8µs ± 5%    12.9µs ± 4%     ~     (p=0.841 n=5+5)
Output/zapr/pass-verbosity-check/objects/40-36     15.6µs ± 5%    15.4µs ± 2%     ~     (p=0.548 n=5+5)
Output/zapr/pass-verbosity-check/objects/50-36     18.1µs ± 4%    17.7µs ± 6%     ~     (p=0.421 n=5+5)
Output/zapr/pass-verbosity-check/objects/60-36     20.6µs ± 3%    19.4µs ± 5%   -5.57%  (p=0.016 n=5+5)
Output/zapr/pass-verbosity-check/objects/70-36     22.1µs ± 6%    22.8µs ± 3%     ~     (p=0.222 n=5+5)
Output/zapr/pass-verbosity-check/objects/80-36     25.3µs ± 4%    25.0µs ± 2%     ~     (p=0.548 n=5+5)
Output/zapr/pass-verbosity-check/objects/90-36     26.3µs ± 4%    27.2µs ±10%     ~     (p=0.222 n=5+5)
Output/zapr/pass-verbosity-check/objects/100-36    28.6µs ± 5%    29.9µs ± 3%     ~     (p=0.151 n=5+5)
Output/zapr/fail-verbosity-check/objects/0-36       370ns ± 2%     337ns ± 3%   -9.02%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/10-36     1.46µs ± 2%    0.34µs ± 3%  -76.54%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/20-36     2.31µs ± 2%    0.34µs ± 6%  -85.38%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/30-36     3.19µs ± 2%    0.34µs ± 4%  -89.29%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/40-36     4.00µs ± 2%    0.34µs ± 4%  -91.55%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/50-36     4.86µs ± 2%    0.34µs ± 5%  -92.93%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/60-36     5.78µs ± 2%    0.34µs ± 1%  -94.12%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/70-36     6.57µs ± 3%    0.34µs ± 2%  -94.89%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/80-36     7.45µs ± 1%    0.34µs ± 3%  -95.49%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/90-36     8.24µs ± 3%    0.34µs ± 5%  -95.92%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/100-36    8.96µs ± 2%    0.34µs ± 4%  -96.21%  (p=0.008 n=5+5)

name                                             old alloc/op   new alloc/op   delta
Output/klog/no-verbosity-check/objects/0-36          336B ± 0%      352B ± 0%   +4.76%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/10-36       1.47kB ± 0%    1.49kB ± 0%   +1.09%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/20-36       2.60kB ± 0%    2.61kB ± 0%   +0.62%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/30-36       3.77kB ± 0%    3.78kB ± 0%   +0.42%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/40-36       4.82kB ± 0%    4.84kB ± 0%   +0.33%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/50-36       6.65kB ± 0%    6.67kB ± 0%   +0.24%  (p=0.016 n=5+4)
Output/klog/no-verbosity-check/objects/60-36       7.74kB ± 0%    7.75kB ± 0%   +0.21%  (p=0.016 n=4+5)
Output/klog/no-verbosity-check/objects/70-36       9.45kB ± 0%    9.47kB ± 0%   +0.17%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/80-36       10.8kB ± 0%    10.8kB ± 0%   +0.15%  (p=0.029 n=4+4)
Output/klog/no-verbosity-check/objects/90-36       12.0kB ± 0%    12.0kB ± 0%   +0.13%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/100-36      13.0kB ± 0%    13.0kB ± 0%   +0.12%  (p=0.029 n=4+4)
Output/klog/pass-verbosity-check/objects/0-36        336B ± 0%      352B ± 0%   +4.76%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/10-36     1.47kB ± 0%    1.49kB ± 0%   +1.09%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/20-36     2.60kB ± 0%    2.61kB ± 0%   +0.62%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/30-36     3.77kB ± 0%    3.78kB ± 0%   +0.42%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/40-36     4.82kB ± 0%    4.84kB ± 0%   +0.33%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/50-36     6.65kB ± 0%    6.67kB ± 0%   +0.24%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/60-36     7.74kB ± 0%    7.76kB ± 0%   +0.21%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/70-36     9.45kB ± 0%    9.47kB ± 0%   +0.17%  (p=0.016 n=5+4)
Output/klog/pass-verbosity-check/objects/80-36     10.8kB ± 0%    10.8kB ± 0%   +0.15%  (p=0.029 n=4+4)
Output/klog/pass-verbosity-check/objects/90-36     12.0kB ± 0%    12.0kB ± 0%   +0.13%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/100-36    13.0kB ± 0%    13.0kB ± 0%   +0.12%  (p=0.016 n=4+5)
Output/klog/fail-verbosity-check/objects/0-36       80.0B ± 0%     72.0B ± 0%  -10.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/10-36       400B ± 0%       72B ± 0%  -82.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/20-36       720B ± 0%       72B ± 0%  -90.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/30-36     1.10kB ± 0%    0.07kB ± 0%  -93.48%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/40-36     1.36kB ± 0%    0.07kB ± 0%  -94.71%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/50-36     1.87kB ± 0%    0.07kB ± 0%  -96.15%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/60-36     2.13kB ± 0%    0.07kB ± 0%  -96.62%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/70-36     2.38kB ± 0%    0.07kB ± 0%  -96.98%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/80-36     2.77kB ± 0%    0.07kB ± 0%  -97.40%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/90-36     3.15kB ± 0%    0.07kB ± 0%  -97.72%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/100-36    3.28kB ± 0%    0.07kB ± 0%  -97.80%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/0-36          700B ± 0%      716B ± 0%   +2.29%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/10-36       1.02kB ± 0%    1.04kB ± 0%   +1.57%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/20-36       1.34kB ± 0%    1.36kB ± 0%   +1.19%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/30-36       1.73kB ± 0%    1.75kB ± 0%   +0.95%  (p=0.016 n=4+5)
Output/zapr/no-verbosity-check/objects/40-36       1.99kB ± 0%    2.01kB ± 0%   +0.82%  (p=0.016 n=5+4)
Output/zapr/no-verbosity-check/objects/50-36       2.50kB ± 0%    2.52kB ± 0%   +0.64%  (p=0.016 n=4+5)
Output/zapr/no-verbosity-check/objects/60-36       2.76kB ± 0%    2.78kB ± 0%   +0.58%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/70-36       3.02kB ± 0%    3.04kB ± 0%   +0.52%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/80-36       3.41kB ± 0%    3.43kB ± 0%   +0.46%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/90-36       3.80kB ± 0%    3.81kB ± 0%   +0.43%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/100-36      3.93kB ± 0%    3.94kB ± 0%   +0.42%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/0-36        724B ± 0%      740B ± 0%   +2.21%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/10-36     1.05kB ± 0%    1.06kB ± 0%   +1.53%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/20-36     1.37kB ± 0%    1.38kB ± 0%   +1.17%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/30-36     1.75kB ± 0%    1.77kB ± 0%   +0.92%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/40-36     2.01kB ± 0%    2.03kB ± 0%   +0.79%  (p=0.029 n=4+4)
Output/zapr/pass-verbosity-check/objects/50-36     2.53kB ± 0%    2.54kB ± 0%   +0.62%  (p=0.016 n=5+4)
Output/zapr/pass-verbosity-check/objects/60-36     2.79kB ± 0%    2.80kB ± 0%   +0.59%  (p=0.016 n=5+4)
Output/zapr/pass-verbosity-check/objects/70-36     3.05kB ± 0%    3.06kB ± 0%   +0.55%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/80-36     3.43kB ± 0%    3.45kB ± 0%   +0.48%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/90-36     3.82kB ± 0%    3.84kB ± 0%   +0.48%  (p=0.016 n=4+5)
Output/zapr/pass-verbosity-check/objects/100-36    3.95kB ± 0%    3.97kB ± 0%   +0.44%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/0-36        104B ± 0%       96B ± 0%   -7.69%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/10-36       424B ± 0%       96B ± 0%  -77.36%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/20-36       744B ± 0%       96B ± 0%  -87.10%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/30-36     1.13kB ± 0%    0.10kB ± 0%  -91.49%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/40-36     1.38kB ± 0%    0.10kB ± 0%  -93.06%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/50-36     1.90kB ± 0%    0.10kB ± 0%  -94.94%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/60-36     2.15kB ± 0%    0.10kB ± 0%  -95.54%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/70-36     2.41kB ± 0%    0.10kB ± 0%  -96.01%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/80-36     2.79kB ± 0%    0.10kB ± 0%  -96.56%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/90-36     3.18kB ± 0%    0.10kB ± 0%  -96.98%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/100-36    3.30kB ± 0%    0.10kB ± 0%  -97.09%  (p=0.008 n=5+5)

name                                             old allocs/op  new allocs/op  delta
Output/klog/no-verbosity-check/objects/0-36          9.00 ± 0%     10.00 ± 0%  +11.11%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/10-36         51.0 ± 0%      52.0 ± 0%   +1.96%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/20-36         91.0 ± 0%      92.0 ± 0%   +1.10%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/30-36          131 ± 0%       132 ± 0%   +0.76%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/40-36          171 ± 0%       172 ± 0%   +0.58%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/50-36          214 ± 0%       215 ± 0%   +0.47%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/60-36          254 ± 0%       255 ± 0%   +0.39%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/70-36          297 ± 0%       298 ± 0%   +0.34%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/80-36          337 ± 0%       338 ± 0%   +0.30%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/90-36          377 ± 0%       378 ± 0%   +0.27%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/100-36         417 ± 0%       418 ± 0%   +0.24%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/0-36        9.00 ± 0%     10.00 ± 0%  +11.11%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/10-36       51.0 ± 0%      52.0 ± 0%   +1.96%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/20-36       91.0 ± 0%      92.0 ± 0%   +1.10%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/30-36        131 ± 0%       132 ± 0%   +0.76%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/40-36        171 ± 0%       172 ± 0%   +0.58%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/50-36        214 ± 0%       215 ± 0%   +0.47%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/60-36        254 ± 0%       255 ± 0%   +0.39%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/70-36        297 ± 0%       298 ± 0%   +0.34%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/80-36        337 ± 0%       338 ± 0%   +0.30%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/90-36        377 ± 0%       378 ± 0%   +0.27%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/100-36       417 ± 0%       418 ± 0%   +0.24%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/0-36        3.00 ± 0%      3.00 ± 0%     ~     (all equal)
Output/klog/fail-verbosity-check/objects/10-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/20-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/30-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/40-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/50-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/60-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/70-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/80-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/90-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/100-36      4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/0-36          11.0 ± 0%      12.0 ± 0%   +9.09%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/10-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/20-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/30-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/40-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/50-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/60-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/70-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/80-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/90-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/100-36        12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/0-36        12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/10-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/20-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/30-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/40-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/50-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/60-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/70-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/80-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/90-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/100-36      13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/0-36        4.00 ± 0%      4.00 ± 0%     ~     (all equal)
Output/zapr/fail-verbosity-check/objects/10-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/20-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/30-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/40-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/50-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/60-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/70-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/80-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/90-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/100-36      5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)

@pohly
Copy link
Author

pohly commented Apr 27, 2022

Here are the benchmark results for the current implementation with String.

There is some additional overhead when klog emits the value. But IMHO that is acceptable because skipping a call should be more common and long-term everyone who cares about performance should use zapr, which is as fast as before.

name                                             old time/op    new time/op    delta
Output/klog/no-verbosity-check/objects/0-36        2.81µs ± 6%    3.05µs ± 3%   +8.42%  (p=0.016 n=5+5)
Output/klog/no-verbosity-check/objects/10-36       9.93µs ± 4%   10.80µs ± 7%   +8.78%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/20-36       16.9µs ± 3%    18.6µs ± 7%   +9.87%  (p=0.016 n=5+5)
Output/klog/no-verbosity-check/objects/30-36       23.4µs ± 4%    26.1µs ± 5%  +11.69%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/40-36       30.1µs ± 5%    33.5µs ± 2%  +11.26%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/50-36       39.6µs ± 2%    42.1µs ± 4%   +6.50%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/60-36       44.8µs ± 4%    50.6µs ± 4%  +12.72%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/70-36       52.7µs ± 6%    59.8µs ± 3%  +13.36%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/80-36       59.8µs ± 3%    67.2µs ± 3%  +12.31%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/90-36       66.3µs ± 4%    72.9µs ± 6%   +9.87%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/100-36      72.5µs ±11%    81.1µs ± 5%  +11.81%  (p=0.016 n=5+5)
Output/klog/pass-verbosity-check/objects/0-36      2.70µs ± 5%    3.20µs ± 4%  +18.52%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/10-36     10.1µs ± 5%    11.6µs ± 5%  +14.24%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/20-36     16.8µs ± 3%    18.8µs ± 5%  +11.66%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/30-36     23.6µs ± 2%    25.8µs ± 5%   +9.31%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/40-36     30.8µs ± 5%    33.3µs ± 4%   +8.33%  (p=0.016 n=5+5)
Output/klog/pass-verbosity-check/objects/50-36     40.0µs ± 3%    43.4µs ± 2%   +8.52%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/60-36     46.1µs ± 3%    50.5µs ± 2%   +9.65%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/70-36     54.4µs ± 4%    60.8µs ± 8%  +11.86%  (p=0.016 n=5+5)
Output/klog/pass-verbosity-check/objects/80-36     60.0µs ± 5%    66.9µs ± 4%  +11.40%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/90-36     67.3µs ± 6%    73.3µs ± 6%   +8.99%  (p=0.032 n=5+5)
Output/klog/pass-verbosity-check/objects/100-36    76.5µs ± 3%    80.9µs ± 5%   +5.75%  (p=0.016 n=5+5)
Output/klog/fail-verbosity-check/objects/0-36       298ns ± 3%     278ns ± 4%   -6.54%  (p=0.016 n=5+5)
Output/klog/fail-verbosity-check/objects/10-36     1.36µs ± 3%    0.28µs ± 4%  -79.23%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/20-36     2.26µs ± 2%    0.28µs ± 2%  -87.58%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/30-36     3.11µs ± 2%    0.28µs ± 1%  -90.98%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/40-36     3.92µs ± 3%    0.28µs ± 3%  -92.79%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/50-36     4.84µs ± 1%    0.28µs ± 3%  -94.22%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/60-36     5.69µs ± 3%    0.28µs ± 3%  -95.05%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/70-36     6.37µs ± 0%    0.28µs ± 3%  -95.56%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/80-36     7.33µs ± 2%    0.28µs ± 6%  -96.18%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/90-36     8.16µs ± 2%    0.27µs ± 3%  -96.67%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/100-36    8.96µs ± 2%    0.28µs ± 3%  -96.89%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/0-36        5.19µs ± 6%    5.31µs ± 4%     ~     (p=0.421 n=5+5)
Output/zapr/no-verbosity-check/objects/10-36       8.07µs ± 4%    7.78µs ± 6%     ~     (p=0.222 n=5+5)
Output/zapr/no-verbosity-check/objects/20-36       10.5µs ± 6%    10.7µs ± 6%     ~     (p=0.548 n=5+5)
Output/zapr/no-verbosity-check/objects/30-36       12.9µs ± 3%    12.4µs ± 2%   -3.62%  (p=0.048 n=5+5)
Output/zapr/no-verbosity-check/objects/40-36       15.1µs ± 7%    14.7µs ± 4%     ~     (p=0.421 n=5+5)
Output/zapr/no-verbosity-check/objects/50-36       17.2µs ± 4%    17.2µs ± 6%     ~     (p=0.841 n=5+5)
Output/zapr/no-verbosity-check/objects/60-36       19.3µs ± 5%    19.6µs ± 7%     ~     (p=1.000 n=5+5)
Output/zapr/no-verbosity-check/objects/70-36       21.5µs ± 4%    22.4µs ± 4%     ~     (p=0.056 n=5+5)
Output/zapr/no-verbosity-check/objects/80-36       24.4µs ± 6%    25.0µs ± 3%     ~     (p=0.310 n=5+5)
Output/zapr/no-verbosity-check/objects/90-36       27.0µs ± 3%    26.9µs ± 7%     ~     (p=1.000 n=5+5)
Output/zapr/no-verbosity-check/objects/100-36      28.4µs ± 5%    29.2µs ± 4%     ~     (p=0.310 n=5+5)
Output/zapr/pass-verbosity-check/objects/0-36      5.50µs ± 4%    5.48µs ± 6%     ~     (p=0.841 n=5+5)
Output/zapr/pass-verbosity-check/objects/10-36     7.93µs ± 4%    8.02µs ± 4%     ~     (p=0.548 n=5+5)
Output/zapr/pass-verbosity-check/objects/20-36     10.3µs ± 6%    10.5µs ± 4%     ~     (p=0.548 n=5+5)
Output/zapr/pass-verbosity-check/objects/30-36     12.6µs ± 2%    12.5µs ± 7%     ~     (p=0.548 n=5+5)
Output/zapr/pass-verbosity-check/objects/40-36     15.4µs ± 3%    14.9µs ± 6%     ~     (p=0.151 n=5+5)
Output/zapr/pass-verbosity-check/objects/50-36     17.8µs ± 7%    18.0µs ± 7%     ~     (p=0.690 n=5+5)
Output/zapr/pass-verbosity-check/objects/60-36     20.4µs ± 4%    19.7µs ± 3%     ~     (p=0.095 n=5+5)
Output/zapr/pass-verbosity-check/objects/70-36     23.0µs ± 5%    22.2µs ± 6%     ~     (p=0.222 n=5+5)
Output/zapr/pass-verbosity-check/objects/80-36     24.5µs ± 3%    25.2µs ± 6%     ~     (p=0.222 n=5+5)
Output/zapr/pass-verbosity-check/objects/90-36     27.0µs ± 6%    27.4µs ± 6%     ~     (p=0.841 n=5+5)
Output/zapr/pass-verbosity-check/objects/100-36    29.6µs ± 3%    28.1µs ± 8%     ~     (p=0.095 n=5+5)
Output/zapr/fail-verbosity-check/objects/0-36       370ns ± 3%     347ns ± 1%   -6.34%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/10-36     1.43µs ± 3%    0.34µs ± 2%  -76.20%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/20-36     2.25µs ± 2%    0.34µs ± 2%  -84.79%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/30-36     3.14µs ± 2%    0.35µs ± 3%  -88.95%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/40-36     4.01µs ± 1%    0.34µs ± 2%  -91.40%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/50-36     4.85µs ± 2%    0.35µs ± 3%  -92.86%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/60-36     5.73µs ± 2%    0.34µs ± 2%  -94.13%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/70-36     6.50µs ± 0%    0.35µs ± 3%  -94.60%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/80-36     7.41µs ± 2%    0.34µs ± 3%  -95.37%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/90-36     8.13µs ± 3%    0.35µs ± 1%  -95.75%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/100-36    8.97µs ± 1%    0.34µs ± 2%  -96.26%  (p=0.008 n=5+5)

name                                             old alloc/op   new alloc/op   delta
Output/klog/no-verbosity-check/objects/0-36          336B ± 0%      368B ± 0%   +9.52%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/10-36       1.47kB ± 0%    1.60kB ± 0%   +8.68%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/20-36       2.60kB ± 0%    2.84kB ± 0%   +9.29%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/30-36       3.77kB ± 0%    4.10kB ± 0%   +8.95%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/40-36       4.82kB ± 0%    5.27kB ± 0%   +9.31%  (p=0.016 n=5+4)
Output/klog/no-verbosity-check/objects/50-36       6.65kB ± 0%    7.19kB ± 0%   +8.18%  (p=0.016 n=5+4)
Output/klog/no-verbosity-check/objects/60-36       7.74kB ± 0%    8.40kB ± 0%   +8.49%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/70-36       9.45kB ± 0%   10.21kB ± 0%   +7.96%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/80-36       10.8kB ± 0%    11.6kB ± 0%   +8.19%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/90-36       12.0kB ± 0%    13.0kB ± 0%   +8.16%  (p=0.016 n=4+5)
Output/klog/no-verbosity-check/objects/100-36      13.0kB ± 0%    14.1kB ± 0%   +8.25%  (p=0.029 n=4+4)
Output/klog/pass-verbosity-check/objects/0-36        336B ± 0%      368B ± 0%   +9.52%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/10-36     1.47kB ± 0%    1.60kB ± 0%   +8.68%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/20-36     2.60kB ± 0%    2.84kB ± 0%   +9.29%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/30-36     3.77kB ± 0%    4.10kB ± 0%   +8.95%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/40-36     4.82kB ± 0%    5.27kB ± 0%   +9.31%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/50-36     6.65kB ± 0%    7.19kB ± 0%   +8.19%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/60-36     7.74kB ± 0%    8.40kB ± 0%   +8.49%  (p=0.029 n=4+4)
Output/klog/pass-verbosity-check/objects/70-36     9.45kB ± 0%   10.21kB ± 0%   +7.97%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/80-36     10.8kB ± 0%    11.7kB ± 0%   +8.19%  (p=0.029 n=4+4)
Output/klog/pass-verbosity-check/objects/90-36     12.0kB ± 0%    13.0kB ± 0%   +8.16%  (p=0.016 n=4+5)
Output/klog/pass-verbosity-check/objects/100-36    13.0kB ± 0%    14.1kB ± 0%   +8.25%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/0-36       80.0B ± 0%     72.0B ± 0%  -10.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/10-36       400B ± 0%       72B ± 0%  -82.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/20-36       720B ± 0%       72B ± 0%  -90.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/30-36     1.10kB ± 0%    0.07kB ± 0%  -93.48%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/40-36     1.36kB ± 0%    0.07kB ± 0%  -94.71%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/50-36     1.87kB ± 0%    0.07kB ± 0%  -96.15%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/60-36     2.13kB ± 0%    0.07kB ± 0%  -96.62%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/70-36     2.38kB ± 0%    0.07kB ± 0%  -96.98%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/80-36     2.77kB ± 0%    0.07kB ± 0%  -97.40%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/90-36     3.15kB ± 0%    0.07kB ± 0%  -97.72%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/100-36    3.28kB ± 0%    0.07kB ± 0%  -97.80%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/0-36          700B ± 0%      716B ± 0%   +2.29%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/10-36       1.02kB ± 0%    1.04kB ± 0%   +1.57%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/20-36       1.34kB ± 0%    1.36kB ± 0%   +1.19%  (p=0.016 n=5+4)
Output/zapr/no-verbosity-check/objects/30-36       1.73kB ± 0%    1.75kB ± 0%   +0.89%  (p=0.016 n=5+4)
Output/zapr/no-verbosity-check/objects/40-36       1.99kB ± 0%    2.01kB ± 0%   +0.80%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/50-36       2.51kB ± 0%    2.52kB ± 0%   +0.62%  (p=0.016 n=5+4)
Output/zapr/no-verbosity-check/objects/60-36       2.76kB ± 0%    2.78kB ± 0%   +0.59%  (p=0.016 n=5+4)
Output/zapr/no-verbosity-check/objects/70-36       3.02kB ± 0%    3.04kB ± 0%   +0.53%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/80-36       3.41kB ± 0%    3.43kB ± 0%   +0.47%  (p=0.016 n=5+4)
Output/zapr/no-verbosity-check/objects/90-36       3.80kB ± 0%    3.81kB ± 0%   +0.38%  (p=0.016 n=4+5)
Output/zapr/no-verbosity-check/objects/100-36      3.93kB ± 0%    3.94kB ± 0%   +0.38%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/0-36        724B ± 0%      740B ± 0%   +2.21%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/10-36     1.05kB ± 0%    1.06kB ± 0%   +1.53%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/20-36     1.37kB ± 0%    1.38kB ± 0%   +1.21%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/30-36     1.75kB ± 0%    1.77kB ± 0%   +0.91%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/40-36     2.01kB ± 0%    2.03kB ± 0%   +0.79%  (p=0.016 n=4+5)
Output/zapr/pass-verbosity-check/objects/50-36     2.53kB ± 0%    2.54kB ± 0%   +0.62%  (p=0.016 n=5+4)
Output/zapr/pass-verbosity-check/objects/60-36     2.79kB ± 0%    2.80kB ± 0%   +0.58%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/70-36     3.05kB ± 0%    3.06kB ± 0%   +0.51%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/80-36     3.43kB ± 0%    3.45kB ± 0%   +0.44%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/90-36     3.82kB ± 0%    3.84kB ± 0%   +0.42%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/100-36    3.95kB ± 0%    3.97kB ± 0%   +0.38%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/0-36        104B ± 0%       96B ± 0%   -7.69%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/10-36       424B ± 0%       96B ± 0%  -77.36%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/20-36       744B ± 0%       96B ± 0%  -87.10%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/30-36     1.13kB ± 0%    0.10kB ± 0%  -91.49%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/40-36     1.38kB ± 0%    0.10kB ± 0%  -93.06%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/50-36     1.90kB ± 0%    0.10kB ± 0%  -94.94%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/60-36     2.15kB ± 0%    0.10kB ± 0%  -95.54%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/70-36     2.41kB ± 0%    0.10kB ± 0%  -96.01%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/80-36     2.79kB ± 0%    0.10kB ± 0%  -96.56%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/90-36     3.18kB ± 0%    0.10kB ± 0%  -96.98%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/100-36    3.30kB ± 0%    0.10kB ± 0%  -97.09%  (p=0.008 n=5+5)

name                                             old allocs/op  new allocs/op  delta
Output/klog/no-verbosity-check/objects/0-36          9.00 ± 0%     12.00 ± 0%  +33.33%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/10-36         51.0 ± 0%      54.0 ± 0%   +5.88%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/20-36         91.0 ± 0%      94.0 ± 0%   +3.30%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/30-36          131 ± 0%       134 ± 0%   +2.29%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/40-36          171 ± 0%       174 ± 0%   +1.75%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/50-36          214 ± 0%       217 ± 0%   +1.40%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/60-36          254 ± 0%       257 ± 0%   +1.18%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/70-36          297 ± 0%       300 ± 0%   +1.01%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/80-36          337 ± 0%       340 ± 0%   +0.89%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/90-36          377 ± 0%       380 ± 0%   +0.80%  (p=0.008 n=5+5)
Output/klog/no-verbosity-check/objects/100-36         417 ± 0%       420 ± 0%   +0.72%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/0-36        9.00 ± 0%     12.00 ± 0%  +33.33%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/10-36       51.0 ± 0%      54.0 ± 0%   +5.88%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/20-36       91.0 ± 0%      94.0 ± 0%   +3.30%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/30-36        131 ± 0%       134 ± 0%   +2.29%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/40-36        171 ± 0%       174 ± 0%   +1.75%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/50-36        214 ± 0%       217 ± 0%   +1.40%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/60-36        254 ± 0%       257 ± 0%   +1.18%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/70-36        297 ± 0%       300 ± 0%   +1.01%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/80-36        337 ± 0%       340 ± 0%   +0.89%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/90-36        377 ± 0%       380 ± 0%   +0.80%  (p=0.008 n=5+5)
Output/klog/pass-verbosity-check/objects/100-36       417 ± 0%       420 ± 0%   +0.72%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/0-36        3.00 ± 0%      3.00 ± 0%     ~     (all equal)
Output/klog/fail-verbosity-check/objects/10-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/20-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/30-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/40-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/50-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/60-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/70-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/80-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/90-36       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/klog/fail-verbosity-check/objects/100-36      4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/0-36          11.0 ± 0%      12.0 ± 0%   +9.09%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/10-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/20-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/30-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/40-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/50-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/60-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/70-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/80-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/90-36         12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/no-verbosity-check/objects/100-36        12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/0-36        12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/10-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/20-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/30-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/40-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/50-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/60-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/70-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/80-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/90-36       13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/pass-verbosity-check/objects/100-36      13.0 ± 0%      14.0 ± 0%   +7.69%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/0-36        4.00 ± 0%      4.00 ± 0%     ~     (all equal)
Output/zapr/fail-verbosity-check/objects/10-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/20-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/30-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/40-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/50-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/60-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/70-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/80-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/90-36       5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)
Output/zapr/fail-verbosity-check/objects/100-36      5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.008 n=5+5)

This is a first step towards optimizing it. Performance is expected to depend
primarily on the length of the slice, so that gets varied.
@pohly pohly changed the title RFC: improve KObjs performance replace KObjs with KObjSlice Apr 27, 2022
@thockin
Copy link
Member

thockin commented Apr 27, 2022

Generics would be right, but we are not yet ready to do that in Kubernetes.

Worth pointing out that while interface{} can accept []<anything, []interface{} cannot. It's counter-intuitive until you think about it and it trips people up often enough.

Alternately, taking ...interface{} is more flexible, but has higher encoding cost, and low RoI (IMO), so let's not.

@thockin
Copy link
Member

thockin commented Apr 28, 2022 via email

@pohly
Copy link
Author

pohly commented Apr 28, 2022

As long as MarshalLog is not universally
supported,

Is it the goal that it should be universally supported? In that case we probably should emphasize that in the go-logr documentation.

String() is your safety net, but if you know your impl does support it, you may not need String()

For me, making such assumptions sounds wrong. No reusable package can make it because it might get reused in binaries with unexpected logger implementations.

@thockin
Copy link
Member

thockin commented Apr 28, 2022

Is it the goal that it should be universally supported? In that case we probably should emphasize that in the go-logr documentation.

We should "strongly encourage" it.

For me, making such assumptions sounds wrong. No reusable package can make it because it might get reused in binaries with unexpected logger implementations.

True. Not every package needs to be reusable, but I guess it comes down to how we tell people to think about logging for a given type.

If we say that log impls MAY use String() (but also might not), MAY use MarshalLog() (but also might not), and the preference between those is implementation-defined, what is someone supposed to do? logr is intended to be structured logging, so MarshalLog() seems (to me) to be the better choice. As I said above, I guess it is OK for implementations which are INTENTIONALLY trying to produce text-like output to prefer String(), but I think that's the exception, rather than the rule.

I expect that most people who implement MarshalLog() will also implement String().

@pohly
Copy link
Author

pohly commented Apr 28, 2022

We should "strongly encourage" it.

Okay, so let's add it to klogr. We just need to clarify whether this needs to be in this PR.

I expect that most people who implement MarshalLog() will also implement String().

That's also my conclusion.

So coming back to this PR: KObjSlice supports both. Do we agree that this is the right choice also for it?

If yes, then klog support for MarshalLog-only types can be added separately.

@thockin
Copy link
Member

thockin commented Apr 28, 2022

So coming back to this PR: KObjSlice supports both. Do we agree that this is the right choice also for it?

Probably yes.

@pohly
Copy link
Author

pohly commented Apr 28, 2022

Then this PR should be ready for a final review round because no further changes are needed.

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

LGTM except corner cases

test/output.go Outdated
text: "test",
values: []interface{}{"pods",
klog.KObjSlice(nil)},
expectedOutput: `I output.go:<LINE>] "test" pods="<KObjSlice needs a slice, got type <nil>>"
Copy link
Member

Choose a reason for hiding this comment

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

I think we should handle nil as if it were an empty slice, no?

Copy link
Author

Choose a reason for hiding this comment

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

Agreed and changed.

test/output.go Outdated
&kmeta{Name: "pod-1", Namespace: "kube-system"},
nil,
})},
expectedOutput: `I output.go:<LINE>] "test" pods="<KObjSlice needs a slice of values implementing KMetadata, got type <nil>>"
Copy link
Member

Choose a reason for hiding this comment

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

likewise, why not log this as <nil> ?

Copy link
Author

Choose a reason for hiding this comment

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

Agreed and changed.

KObjSlice can be used in log calls without causing unnecessary work when the
log event does not get logged.
@pohly
Copy link
Author

pohly commented May 10, 2022

PR update with revised nil handling.

For logr.Marshaler support see #325.

@serathius
Copy link

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2022
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pohly, serathius

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2022
@k8s-ci-robot k8s-ci-robot merged commit 42bf7a2 into kubernetes:main May 10, 2022
TylerHelmuth referenced this pull request in open-telemetry/opentelemetry-collector-contrib Dec 19, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [k8s.io/klog](https://github.com/kubernetes/klog) | require | major
| `v1.0.0` -> `v2.110.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>kubernetes/klog (k8s.io/klog)</summary>

###
[`v2.110.1`](https://github.com/kubernetes/klog/releases/tag/v2.110.1):
Prepare klog release for Kubernetes v1.29 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.100.1...v2.110.1)

#### What's Changed

- fix: SetLogger via klog.SetLogger will output an unexpected newline by
[@&#8203;aimuz](https://github.com/aimuz) in
[https://github.com/kubernetes/klog/pull/378](https://github.com/kubernetes/klog/pull/378)
- resolve comments warning by
[@&#8203;lowang-bh](https://github.com/lowang-bh) in
[https://github.com/kubernetes/klog/pull/379](https://github.com/kubernetes/klog/pull/379)
- stderrthreshold: fix flag comment by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/376](https://github.com/kubernetes/klog/pull/376)
- enable "go vet" checks for parameters by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/390](https://github.com/kubernetes/klog/pull/390)
- promote experimental code to stable by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/392](https://github.com/kubernetes/klog/pull/392)
- golangci-lint action by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/380](https://github.com/kubernetes/klog/pull/380)
- output: handle WithName like zapr does by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/391](https://github.com/kubernetes/klog/pull/391)
- slog support + logr 1.3.0 update by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/384](https://github.com/kubernetes/klog/pull/384)

#### New Contributors

- [@&#8203;aimuz](https://github.com/aimuz) made their first
contribution in
[https://github.com/kubernetes/klog/pull/378](https://github.com/kubernetes/klog/pull/378)
- [@&#8203;lowang-bh](https://github.com/lowang-bh) made their first
contribution in
[https://github.com/kubernetes/klog/pull/379](https://github.com/kubernetes/klog/pull/379)

**Full Changelog**:
kubernetes/klog@v2.100.1...v2.110.1

###
[`v2.100.1`](https://github.com/kubernetes/klog/releases/tag/v2.100.1):
Prepare klog release for Kubernetes v1.28 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.90.1...v2.100.1)

#### What's Changed

- expose logBridge via NewStandardLog() by
[@&#8203;mikedanese](https://github.com/mikedanese) in
[https://github.com/kubernetes/klog/pull/369](https://github.com/kubernetes/klog/pull/369)
- add Format wrapper by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/374](https://github.com/kubernetes/klog/pull/374)
- JSON as fallback encoding by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/375](https://github.com/kubernetes/klog/pull/375)

#### New Contributors

- [@&#8203;mikedanese](https://github.com/mikedanese) made their first
contribution in
[https://github.com/kubernetes/klog/pull/369](https://github.com/kubernetes/klog/pull/369)

**Full Changelog**:
kubernetes/klog@v2.90.1...v2.100.1

###
[`v2.90.1`](https://github.com/kubernetes/klog/releases/tag/v2.90.1):
Prepare klog release for Kubernetes v1.27 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1)

#### What's Changed

- buffer: restore dropping of too large buffers by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/366](https://github.com/kubernetes/klog/pull/366)
- ktesting improvements by [@&#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/365](https://github.com/kubernetes/klog/pull/365)
- ktesting + textlogger config api by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/368](https://github.com/kubernetes/klog/pull/368)
- textlogger write through by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/363](https://github.com/kubernetes/klog/pull/363)

**Full Changelog**:
kubernetes/klog@v2.90.0...v2.90.1

###
[`v2.90.0`](https://github.com/kubernetes/klog/releases/tag/v2.90.0):
Prepare klog release for Kubernetes v1.27 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.80.1...v2.90.0)

#### What's Changed

- klog: benchmark the overhead when logging is off by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/355](https://github.com/kubernetes/klog/pull/355)
- improve textlogger by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/362](https://github.com/kubernetes/klog/pull/362)

**Full Changelog**:
kubernetes/klog@v2.80.1...v2.90.0

##### There are some API differences from previous version

    k8s.io/klog/v2/klogr contains incompatible changes:
     - klogger.Enabled: removed
     - klogger.Error: removed
     - klogger.Info: removed

    k8s.io/klog/v2/test contains incompatible changes:
     - InitKlog: changed from func() to func(testing.TB) *flag.FlagSet

###
[`v2.80.1`](https://github.com/kubernetes/klog/releases/tag/v2.80.1):
Prepare klog release for Kubernetes v1.26 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.80.0...v2.80.1)

#### What's Changed

- InitFlags concurrency fix by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/349](https://github.com/kubernetes/klog/pull/349)

**Full Changelog**:
kubernetes/klog@v2.80.0...v2.80.1

###
[`v2.80.0`](https://github.com/kubernetes/klog/releases/tag/v2.80.0):
Prepare klog release for Kubernetes v1.26 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.70.1...v2.80.0)

#### What's Changed

- OWNERS: add harshanarayana by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/342](https://github.com/kubernetes/klog/pull/342)
- kvlistformat: fix the issue with display marshalled value for non
string type by
[@&#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/344](https://github.com/kubernetes/klog/pull/344)
- Bump version of golang to 1.19 and drop older versions by
[@&#8203;dims](https://github.com/dims) in
[https://github.com/kubernetes/klog/pull/345](https://github.com/kubernetes/klog/pull/345)

**Full Changelog**:
kubernetes/klog@v2.70.1...v2.80.0

###
[`v2.70.1`](https://github.com/kubernetes/klog/releases/tag/v2.70.1):
Prepare klog release for Kubernetes v1.25 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.70.0...v2.70.1)

#### What's Changed

- ktesting: handle test completion by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/337](https://github.com/kubernetes/klog/pull/337)
- contextual logging: enable by default again by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/341](https://github.com/kubernetes/klog/pull/341)

**Full Changelog**:
kubernetes/klog@v2.70.0...v2.70.1

###
[`v2.70.0`](https://github.com/kubernetes/klog/releases/tag/v2.70.0):
Prepare klog release for Kubernetes v1.25 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.60.1...v2.70.0)

#### What's Changed

- logcheck: contextual logging + enhanced checks by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/297](https://github.com/kubernetes/klog/pull/297)
- hack/tools: drop dependency on golangci-lint by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/313](https://github.com/kubernetes/klog/pull/313)
- StopFlushDaemon: document flushing on shutdown by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/314](https://github.com/kubernetes/klog/pull/314)
- logcheck: fix detection of invalid \* regexp in filter by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/315](https://github.com/kubernetes/klog/pull/315)
- README.md: clarify -logtostderr by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/319](https://github.com/kubernetes/klog/pull/319)
- Trim duplicates by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/324](https://github.com/kubernetes/klog/pull/324)
- replace KObjs with KObjSlice by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/322](https://github.com/kubernetes/klog/pull/322)
- support logr.Marshaler by [@&#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/325](https://github.com/kubernetes/klog/pull/325)
- internal: remove unused TrimDuplicates by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/326](https://github.com/kubernetes/klog/pull/326)
- save and restore state by [@&#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/320](https://github.com/kubernetes/klog/pull/320)
- GitHub: use apidiff with more recent Go by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/329](https://github.com/kubernetes/klog/pull/329)
- remove hack/tools by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/330](https://github.com/kubernetes/klog/pull/330)
- GIT-331: fix shadowing key from the kv pair by
[@&#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/332](https://github.com/kubernetes/klog/pull/332)
- klog.Fatal backtrace revert by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/328](https://github.com/kubernetes/klog/pull/328)
- ktesting: capture log data in memory by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/327](https://github.com/kubernetes/klog/pull/327)
- GIT-275: add tests for int and struct keys by
[@&#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/333](https://github.com/kubernetes/klog/pull/333)

#### New Contributors

- [@&#8203;harshanarayana](https://github.com/harshanarayana) made
their first contribution in
[https://github.com/kubernetes/klog/pull/332](https://github.com/kubernetes/klog/pull/332)

**Full Changelog**:
kubernetes/klog@v2.60.1...v2.70.0

###
[`v2.60.1`](https://github.com/kubernetes/klog/releases/tag/v2.60.1):
Prepare klog release for Kubernetes v1.24 (Take 6)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.60.0...v2.60.1)

#### What's Changed

- Cleanup OWNERS file by
[@&#8203;serathius](https://github.com/serathius) in
[https://github.com/kubernetes/klog/pull/309](https://github.com/kubernetes/klog/pull/309)
- dependencies: avoid k8s.io/utils, fork clock code instead by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/310](https://github.com/kubernetes/klog/pull/310)
- promote contextual logging APIs to stable by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/311](https://github.com/kubernetes/klog/pull/311)

**Full Changelog**:
kubernetes/klog@v2.60.0...v2.60.1

###
[`v2.60.0`](https://github.com/kubernetes/klog/releases/tag/v2.60.0):
Prepare klog release for Kubernetes v1.24 (Take 5)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.2...v2.60.0)

#### What's Changed

- SetContextualLogger: remove unintentionally merged API call by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/308](https://github.com/kubernetes/klog/pull/308)

**Full Changelog**:
kubernetes/klog@v2.50.2...v2.60.0

###
[`v2.50.2`](https://github.com/kubernetes/klog/compare/v2.50.1...v2.50.2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.1...v2.50.2)

###
[`v2.50.1`](https://github.com/kubernetes/klog/releases/tag/v2.50.1):
Prepare klog release for Kubernetes v1.24 (Take 4)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.0...v2.50.1)

#### What's Changed

- SetLoggerWithOptions: support flushing by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/306](https://github.com/kubernetes/klog/pull/306)

**Full Changelog**:
kubernetes/klog@v2.50.0...v2.50.1

###
[`v2.50.0`](https://github.com/kubernetes/klog/releases/tag/v2.50.0):
Prepare klog release for Kubernetes v1.24 (Take 3)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.40.1...v2.50.0)

#### What's Changed

- Panic on empty info with custom logr by
[@&#8203;jklaw90](https://github.com/jklaw90) in
[https://github.com/kubernetes/klog/pull/283](https://github.com/kubernetes/klog/pull/283)
- Add missing Depth logging functions. by
[@&#8203;s3rj1k](https://github.com/s3rj1k) in
[https://github.com/kubernetes/klog/pull/280](https://github.com/kubernetes/klog/pull/280)
- fix typo in klog.go by
[@&#8203;cocaccola](https://github.com/cocaccola) in
[https://github.com/kubernetes/klog/pull/270](https://github.com/kubernetes/klog/pull/270)
- Update README.md by
[@&#8203;noaabarki](https://github.com/noaabarki) in
[https://github.com/kubernetes/klog/pull/281](https://github.com/kubernetes/klog/pull/281)
- log filter: ignored by V, used during log call by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/290](https://github.com/kubernetes/klog/pull/290)
- SetLogger/ClearLogger/SetLogFilter cleanup by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/289](https://github.com/kubernetes/klog/pull/289)
- fixes for PR
[#&#8203;280](https://github.com/kubernetes/klog/issues/280),
refactoring, textlogger, unit test by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/287](https://github.com/kubernetes/klog/pull/287)
- klogr verbosity by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/295](https://github.com/kubernetes/klog/pull/295)
- test: fix Go version matrix by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/298](https://github.com/kubernetes/klog/pull/298)
- handle panics in MarshalLog, Error, String by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/299](https://github.com/kubernetes/klog/pull/299)
- Fix goroutine leak: make flushDaemon stoppable by
[@&#8203;katexochen](https://github.com/katexochen) in
[https://github.com/kubernetes/klog/pull/293](https://github.com/kubernetes/klog/pull/293)
- structured logging: replacing Fatal/Exit/etc. without loss of flushing
by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/303](https://github.com/kubernetes/klog/pull/303)
- contextual logging by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/296](https://github.com/kubernetes/klog/pull/296)
- remove side effects of tests by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/305](https://github.com/kubernetes/klog/pull/305)
- tests: stop testing with Go 1.14 by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/304](https://github.com/kubernetes/klog/pull/304)

#### New Contributors

- [@&#8203;jklaw90](https://github.com/jklaw90) made their first
contribution in
[https://github.com/kubernetes/klog/pull/283](https://github.com/kubernetes/klog/pull/283)
- [@&#8203;s3rj1k](https://github.com/s3rj1k) made their first
contribution in
[https://github.com/kubernetes/klog/pull/280](https://github.com/kubernetes/klog/pull/280)
- [@&#8203;cocaccola](https://github.com/cocaccola) made their first
contribution in
[https://github.com/kubernetes/klog/pull/270](https://github.com/kubernetes/klog/pull/270)
- [@&#8203;noaabarki](https://github.com/noaabarki) made their first
contribution in
[https://github.com/kubernetes/klog/pull/281](https://github.com/kubernetes/klog/pull/281)
- [@&#8203;katexochen](https://github.com/katexochen) made their first
contribution in
[https://github.com/kubernetes/klog/pull/293](https://github.com/kubernetes/klog/pull/293)

**Full Changelog**:
kubernetes/klog@v2.40.1...v2.50.0

###
[`v2.40.1`](https://github.com/kubernetes/klog/releases/tag/v2.40.1):
Prepare klog release for Kubernetes v1.24 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.40.0...v2.40.1)

#### What's Changed

- Using OS targeted go files to separate out the username logic. by
[@&#8203;phillipsj](https://github.com/phillipsj) in
[https://github.com/kubernetes/klog/pull/271](https://github.com/kubernetes/klog/pull/271)
- Recover from nil pointers when logging by
[@&#8203;dims](https://github.com/dims) in
[https://github.com/kubernetes/klog/pull/279](https://github.com/kubernetes/klog/pull/279)

#### New Contributors

- [@&#8203;phillipsj](https://github.com/phillipsj) made their first
contribution in
[https://github.com/kubernetes/klog/pull/271](https://github.com/kubernetes/klog/pull/271)

**Full Changelog**:
kubernetes/klog@v2.40.0...v2.40.1

###
[`v2.40.0`](https://github.com/kubernetes/klog/releases/tag/v2.40.0):
Prepare klog release for Kubernetes v1.24

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.30.0...v2.40.0)

#### What's Changed

- structured logging: support values with line breaks by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/273](https://github.com/kubernetes/klog/pull/273)
- Fix klog lock release on panic error by
[@&#8203;astraw99](https://github.com/astraw99) in
[https://github.com/kubernetes/klog/pull/272](https://github.com/kubernetes/klog/pull/272)
- add format test for KObjs by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/276](https://github.com/kubernetes/klog/pull/276)
- add Verbose.InfoSDepth by [@&#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/277](https://github.com/kubernetes/klog/pull/277)

#### Known Issues

-
[https://github.com/kubernetes/klog/issues/278](https://github.com/kubernetes/klog/issues/278)

#### New Contributors

- [@&#8203;astraw99](https://github.com/astraw99) made their first
contribution in
[https://github.com/kubernetes/klog/pull/272](https://github.com/kubernetes/klog/pull/272)

**Full Changelog**:
kubernetes/klog@v2.30.0...v2.40.0

###
[`v2.30.0`](https://github.com/kubernetes/klog/releases/tag/v2.30.0):
Prepare klog release for Kubernetes v1.23 (take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.20.0...v2.30.0)

#### What's Changed

- Fix logcheck exit function by
[@&#8203;luyou86](https://github.com/luyou86) in
[https://github.com/kubernetes/klog/pull/265](https://github.com/kubernetes/klog/pull/265)
- custom marshaler for ObjectRef by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/266](https://github.com/kubernetes/klog/pull/266)

#### New Contributors

- [@&#8203;luyou86](https://github.com/luyou86) made their first
contribution in
[https://github.com/kubernetes/klog/pull/265](https://github.com/kubernetes/klog/pull/265)

**Full Changelog**:
kubernetes/klog@v2.20.0...v2.30.0

###
[`v2.20.0`](https://github.com/kubernetes/klog/releases/tag/v2.20.0):
Prepare klog release for Kubernetes v1.23

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.10.0...v2.20.0)

Changes are here :
kubernetes/klog@v2.10.0...v2.20.0

since we moved to logr v1.0.0, there are incompatible changes:

    - klogger.Enabled: changed from func() bool to func(int) bool
- klogger.Info: changed from func(string, ...interface{}) to func(int,
string, ...interface{})
    - klogger.V: removed
- klogger.WithCallDepth: changed from func(int)
github.com/go-logr/logr.Logger to func(int)
github.com/go-logr/logr.LogSink
- klogger.WithName: changed from func(string)
github.com/go-logr/logr.Logger to func(string)
github.com/go-logr/logr.LogSink
- klogger.WithValues: changed from func(...interface{})
github.com/go-logr/logr.Logger to func(...interface{})
github.com/go-logr/logr.LogSink

[`83653a6`](https://github.com/kubernetes/klog/commit/83653a6deebf)
Update to newest versions of golang 1.17.x
[`d648c2e`](https://github.com/kubernetes/klog/commit/d648c2e42d30)
fix file-based filtering symbolization
[`8ee3d65`](https://github.com/kubernetes/klog/commit/8ee3d652c96b)
export ClearLogger
[`4171f3c`](https://github.com/kubernetes/klog/commit/4171f3c1be1b)
Switching to logr tag v1.0.0
[`9ab3c2b`](https://github.com/kubernetes/klog/commit/9ab3c2b56cb2)
add serathius as approvers of klog

###
[`v2.10.0`](https://github.com/kubernetes/klog/releases/tag/v2.10.0):
One more change to support 1.22 release

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.9.0...v2.10.0)

Changes are here :
kubernetes/klog@v2.9.0...v2.10.0

new function added:

    func KObjs(arg interface{}) []ObjectRef

###
[`v2.9.0`](https://github.com/kubernetes/klog/releases/tag/v2.9.0):
Prepare release for Kubernetes v1.22

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.8.0...v2.9.0)

Changes are here :
kubernetes/klog@v2.8.0...v2.9.0

[`6a9ef3f`](https://github.com/kubernetes/klog/commit/6a9ef3fa9a15)
fix typo
[`59f7cb5`](https://github.com/kubernetes/klog/commit/59f7cb505f58)
fix byte array display in InfoS and ErrorS
[`cf22f1e`](https://github.com/kubernetes/klog/commit/cf22f1e79721)
Call logr with call depth
[`e95c7e3`](https://github.com/kubernetes/klog/commit/e95c7e303755)
make SetLogger thread-safe
[`2728fe1`](https://github.com/kubernetes/klog/commit/2728fe192acc)
check usage of format specifier in structured log func
[`a18bc97`](https://github.com/kubernetes/klog/commit/a18bc976a212)
Fix by pr suggestions
[`4e4135c`](https://github.com/kubernetes/klog/commit/4e4135c3dd8a)
Add check for InfoS & ErrorS parameters

###
[`v2.8.0`](https://github.com/kubernetes/klog/releases/tag/v2.8.0):
Bug fixes for structured logging for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.7.0...v2.8.0)

###
[`v2.7.0`](https://github.com/kubernetes/klog/releases/tag/v2.7.0):
Miscellaneous fixes for structured logging for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.6.0...v2.7.0)

Changes are here :
kubernetes/klog@v2.6.0...v2.7.0

###
[`v2.6.0`](https://github.com/kubernetes/klog/releases/tag/v2.6.0):
Adding a linter for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.5.0...v2.6.0)

Changes are here :
kubernetes/klog@v2.5.0...v2.6.0

please see
https://github.com/kubernetes/klog/tree/master/hack/tools/logcheck

###
[`v2.5.0`](https://github.com/kubernetes/klog/releases/tag/v2.5.0):
Prepare release for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.4.0...v2.5.0)

Changes are here :
kubernetes/klog@v2.4.0...v2.5.0

klog.go has new API:

+func ErrorSDepth(depth int, err error, msg string, keysAndValues
...interface{}) {
+func InfoSDepth(depth int, msg string, keysAndValues ...interface{}) {

klogr/klogr.go has new API:

    func (l klogger) WithCallDepth(depth int) logr.Logger {
    func NewWithOptions(options ...Option) logr.Logger {
    func WithFormat(format Format) Option {

###
[`v2.4.0`](https://github.com/kubernetes/klog/releases/tag/v2.4.0):
Prepare release for Kubernetes v1.20

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.3.0...v2.4.0)

Changes are here :
kubernetes/klog@v2.3.0...v2.4.0

###
[`v2.3.0`](https://github.com/kubernetes/klog/releases/tag/v2.3.0):
Fix Typo-ed Method Error -&gt; ErrorS

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.2.0...v2.3.0)

Changes are here :
kubernetes/klog@v2.2.0...v2.3.0

###
[`v2.2.0`](https://github.com/kubernetes/klog/releases/tag/v2.2.0):
Dependency update and bugfix for InfoS

[Compare
Source](https://github.com/kubernetes/klog/compare/2.1.0...v2.2.0)

- [`2e691eb`](https://github.com/kubernetes/klog/commit/2e691eb3eeb3)
Fix missing fields in verbose InfoS
- [`966c986`](https://github.com/kubernetes/klog/commit/966c98681ca0)
feat use go-logr v0.2.0

Changes are here :
kubernetes/klog@v2.1.0...v2.2.0

###
[`v2.1.0`](https://github.com/kubernetes/klog/releases/tag/v2.1.0):
Better support for Structured Logging

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.0.0...2.1.0)

We are now enforcing API compatibility, added Windows based tests, and
have tweaked the structured logging methods after some real world
experience updating kubernetes main repo.

- [`bbd9ca1`](https://github.com/kubernetes/klog/commit/bbd9ca1) Add
tests for error in InfoS
- [`1ccc0e1`](https://github.com/kubernetes/klog/commit/1ccc0e1) fix
imported bug time encode format form kvlistFormat
- [`dd4d1a6`](https://github.com/kubernetes/klog/commit/dd4d1a6) fix
typo in README.md
- [`49123d4`](https://github.com/kubernetes/klog/commit/49123d4)
ErrorS(nil, ...) should call loggr.Error(nil, ...)
- [`5b199cd`](https://github.com/kubernetes/klog/commit/5b199cd) Fix
documentation for V(level)
- [`d1eb30f`](https://github.com/kubernetes/klog/commit/d1eb30f) Add
apidiff script to check go signature changes
- [`dc505bf`](https://github.com/kubernetes/klog/commit/dc505bf)
Switch slack channel to #klog
- [`a47ebb9`](https://github.com/kubernetes/klog/commit/a47ebb9) Add
example for co-existence of klog v1 and v2
- [`134f148`](https://github.com/kubernetes/klog/commit/134f148)
logName(): lazily lookup userName instead of on init()
- [`db06a1b`](https://github.com/kubernetes/klog/commit/db06a1b) fix
serialization of special html chars
- [`5727d2a`](https://github.com/kubernetes/klog/commit/5727d2a) Fix
Windows integration tests
- [`edbc1d3`](https://github.com/kubernetes/klog/commit/edbc1d3)
test(\*): TestRollover failed randomly on Windows
- [`6f99060`](https://github.com/kubernetes/klog/commit/6f99060) Add
LogToStderr, a programatic way to log exclusively to stderr or not

###
[`v2.0.0`](https://github.com/kubernetes/klog/releases/tag/v2.0.0):
Release to support Kubernetes v1.19

[Compare
Source](https://github.com/kubernetes/klog/compare/v1.0.0...v2.0.0)

Beware of type change: `Verbose`

New Methods:

-   `SetLogger` (override logger to set a custom implementation)
-   `InfoS` (structured logging)
-   `ErrorS` (structured logging)

Changes are here :
kubernetes/klog@v2.0.0-rc.1...v2.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Yang Song <songy23@users.noreply.github.com>
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
cparkins referenced this pull request in AmadeusITGroup/opentelemetry-collector-contrib Jan 10, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [k8s.io/klog](https://github.com/kubernetes/klog) | require | major
| `v1.0.0` -> `v2.110.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>kubernetes/klog (k8s.io/klog)</summary>

###
[`v2.110.1`](https://github.com/kubernetes/klog/releases/tag/v2.110.1):
Prepare klog release for Kubernetes v1.29 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.100.1...v2.110.1)

#### What's Changed

- fix: SetLogger via klog.SetLogger will output an unexpected newline by
[@&open-telemetry#8203;aimuz](https://github.com/aimuz) in
[https://github.com/kubernetes/klog/pull/378](https://github.com/kubernetes/klog/pull/378)
- resolve comments warning by
[@&open-telemetry#8203;lowang-bh](https://github.com/lowang-bh) in
[https://github.com/kubernetes/klog/pull/379](https://github.com/kubernetes/klog/pull/379)
- stderrthreshold: fix flag comment by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/376](https://github.com/kubernetes/klog/pull/376)
- enable "go vet" checks for parameters by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/390](https://github.com/kubernetes/klog/pull/390)
- promote experimental code to stable by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/392](https://github.com/kubernetes/klog/pull/392)
- golangci-lint action by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/380](https://github.com/kubernetes/klog/pull/380)
- output: handle WithName like zapr does by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/391](https://github.com/kubernetes/klog/pull/391)
- slog support + logr 1.3.0 update by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/384](https://github.com/kubernetes/klog/pull/384)

#### New Contributors

- [@&open-telemetry#8203;aimuz](https://github.com/aimuz) made their first
contribution in
[https://github.com/kubernetes/klog/pull/378](https://github.com/kubernetes/klog/pull/378)
- [@&open-telemetry#8203;lowang-bh](https://github.com/lowang-bh) made their first
contribution in
[https://github.com/kubernetes/klog/pull/379](https://github.com/kubernetes/klog/pull/379)

**Full Changelog**:
kubernetes/klog@v2.100.1...v2.110.1

###
[`v2.100.1`](https://github.com/kubernetes/klog/releases/tag/v2.100.1):
Prepare klog release for Kubernetes v1.28 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.90.1...v2.100.1)

#### What's Changed

- expose logBridge via NewStandardLog() by
[@&open-telemetry#8203;mikedanese](https://github.com/mikedanese) in
[https://github.com/kubernetes/klog/pull/369](https://github.com/kubernetes/klog/pull/369)
- add Format wrapper by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/374](https://github.com/kubernetes/klog/pull/374)
- JSON as fallback encoding by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/375](https://github.com/kubernetes/klog/pull/375)

#### New Contributors

- [@&open-telemetry#8203;mikedanese](https://github.com/mikedanese) made their first
contribution in
[https://github.com/kubernetes/klog/pull/369](https://github.com/kubernetes/klog/pull/369)

**Full Changelog**:
kubernetes/klog@v2.90.1...v2.100.1

###
[`v2.90.1`](https://github.com/kubernetes/klog/releases/tag/v2.90.1):
Prepare klog release for Kubernetes v1.27 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1)

#### What's Changed

- buffer: restore dropping of too large buffers by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/366](https://github.com/kubernetes/klog/pull/366)
- ktesting improvements by [@&open-telemetry#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/365](https://github.com/kubernetes/klog/pull/365)
- ktesting + textlogger config api by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/368](https://github.com/kubernetes/klog/pull/368)
- textlogger write through by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/363](https://github.com/kubernetes/klog/pull/363)

**Full Changelog**:
kubernetes/klog@v2.90.0...v2.90.1

###
[`v2.90.0`](https://github.com/kubernetes/klog/releases/tag/v2.90.0):
Prepare klog release for Kubernetes v1.27 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.80.1...v2.90.0)

#### What's Changed

- klog: benchmark the overhead when logging is off by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/355](https://github.com/kubernetes/klog/pull/355)
- improve textlogger by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/362](https://github.com/kubernetes/klog/pull/362)

**Full Changelog**:
kubernetes/klog@v2.80.1...v2.90.0

##### There are some API differences from previous version

    k8s.io/klog/v2/klogr contains incompatible changes:
     - klogger.Enabled: removed
     - klogger.Error: removed
     - klogger.Info: removed

    k8s.io/klog/v2/test contains incompatible changes:
     - InitKlog: changed from func() to func(testing.TB) *flag.FlagSet

###
[`v2.80.1`](https://github.com/kubernetes/klog/releases/tag/v2.80.1):
Prepare klog release for Kubernetes v1.26 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.80.0...v2.80.1)

#### What's Changed

- InitFlags concurrency fix by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/349](https://github.com/kubernetes/klog/pull/349)

**Full Changelog**:
kubernetes/klog@v2.80.0...v2.80.1

###
[`v2.80.0`](https://github.com/kubernetes/klog/releases/tag/v2.80.0):
Prepare klog release for Kubernetes v1.26 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.70.1...v2.80.0)

#### What's Changed

- OWNERS: add harshanarayana by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/342](https://github.com/kubernetes/klog/pull/342)
- kvlistformat: fix the issue with display marshalled value for non
string type by
[@&open-telemetry#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/344](https://github.com/kubernetes/klog/pull/344)
- Bump version of golang to 1.19 and drop older versions by
[@&open-telemetry#8203;dims](https://github.com/dims) in
[https://github.com/kubernetes/klog/pull/345](https://github.com/kubernetes/klog/pull/345)

**Full Changelog**:
kubernetes/klog@v2.70.1...v2.80.0

###
[`v2.70.1`](https://github.com/kubernetes/klog/releases/tag/v2.70.1):
Prepare klog release for Kubernetes v1.25 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.70.0...v2.70.1)

#### What's Changed

- ktesting: handle test completion by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/337](https://github.com/kubernetes/klog/pull/337)
- contextual logging: enable by default again by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/341](https://github.com/kubernetes/klog/pull/341)

**Full Changelog**:
kubernetes/klog@v2.70.0...v2.70.1

###
[`v2.70.0`](https://github.com/kubernetes/klog/releases/tag/v2.70.0):
Prepare klog release for Kubernetes v1.25 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.60.1...v2.70.0)

#### What's Changed

- logcheck: contextual logging + enhanced checks by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/297](https://github.com/kubernetes/klog/pull/297)
- hack/tools: drop dependency on golangci-lint by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/313](https://github.com/kubernetes/klog/pull/313)
- StopFlushDaemon: document flushing on shutdown by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/314](https://github.com/kubernetes/klog/pull/314)
- logcheck: fix detection of invalid \* regexp in filter by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/315](https://github.com/kubernetes/klog/pull/315)
- README.md: clarify -logtostderr by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/319](https://github.com/kubernetes/klog/pull/319)
- Trim duplicates by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/324](https://github.com/kubernetes/klog/pull/324)
- replace KObjs with KObjSlice by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/322](https://github.com/kubernetes/klog/pull/322)
- support logr.Marshaler by [@&open-telemetry#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/325](https://github.com/kubernetes/klog/pull/325)
- internal: remove unused TrimDuplicates by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/326](https://github.com/kubernetes/klog/pull/326)
- save and restore state by [@&open-telemetry#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/320](https://github.com/kubernetes/klog/pull/320)
- GitHub: use apidiff with more recent Go by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/329](https://github.com/kubernetes/klog/pull/329)
- remove hack/tools by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/330](https://github.com/kubernetes/klog/pull/330)
- GIT-331: fix shadowing key from the kv pair by
[@&open-telemetry#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/332](https://github.com/kubernetes/klog/pull/332)
- klog.Fatal backtrace revert by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/328](https://github.com/kubernetes/klog/pull/328)
- ktesting: capture log data in memory by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/327](https://github.com/kubernetes/klog/pull/327)
- GIT-275: add tests for int and struct keys by
[@&open-telemetry#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/333](https://github.com/kubernetes/klog/pull/333)

#### New Contributors

- [@&open-telemetry#8203;harshanarayana](https://github.com/harshanarayana) made
their first contribution in
[https://github.com/kubernetes/klog/pull/332](https://github.com/kubernetes/klog/pull/332)

**Full Changelog**:
kubernetes/klog@v2.60.1...v2.70.0

###
[`v2.60.1`](https://github.com/kubernetes/klog/releases/tag/v2.60.1):
Prepare klog release for Kubernetes v1.24 (Take 6)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.60.0...v2.60.1)

#### What's Changed

- Cleanup OWNERS file by
[@&open-telemetry#8203;serathius](https://github.com/serathius) in
[https://github.com/kubernetes/klog/pull/309](https://github.com/kubernetes/klog/pull/309)
- dependencies: avoid k8s.io/utils, fork clock code instead by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/310](https://github.com/kubernetes/klog/pull/310)
- promote contextual logging APIs to stable by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/311](https://github.com/kubernetes/klog/pull/311)

**Full Changelog**:
kubernetes/klog@v2.60.0...v2.60.1

###
[`v2.60.0`](https://github.com/kubernetes/klog/releases/tag/v2.60.0):
Prepare klog release for Kubernetes v1.24 (Take 5)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.2...v2.60.0)

#### What's Changed

- SetContextualLogger: remove unintentionally merged API call by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/308](https://github.com/kubernetes/klog/pull/308)

**Full Changelog**:
kubernetes/klog@v2.50.2...v2.60.0

###
[`v2.50.2`](https://github.com/kubernetes/klog/compare/v2.50.1...v2.50.2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.1...v2.50.2)

###
[`v2.50.1`](https://github.com/kubernetes/klog/releases/tag/v2.50.1):
Prepare klog release for Kubernetes v1.24 (Take 4)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.0...v2.50.1)

#### What's Changed

- SetLoggerWithOptions: support flushing by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/306](https://github.com/kubernetes/klog/pull/306)

**Full Changelog**:
kubernetes/klog@v2.50.0...v2.50.1

###
[`v2.50.0`](https://github.com/kubernetes/klog/releases/tag/v2.50.0):
Prepare klog release for Kubernetes v1.24 (Take 3)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.40.1...v2.50.0)

#### What's Changed

- Panic on empty info with custom logr by
[@&open-telemetry#8203;jklaw90](https://github.com/jklaw90) in
[https://github.com/kubernetes/klog/pull/283](https://github.com/kubernetes/klog/pull/283)
- Add missing Depth logging functions. by
[@&open-telemetry#8203;s3rj1k](https://github.com/s3rj1k) in
[https://github.com/kubernetes/klog/pull/280](https://github.com/kubernetes/klog/pull/280)
- fix typo in klog.go by
[@&open-telemetry#8203;cocaccola](https://github.com/cocaccola) in
[https://github.com/kubernetes/klog/pull/270](https://github.com/kubernetes/klog/pull/270)
- Update README.md by
[@&open-telemetry#8203;noaabarki](https://github.com/noaabarki) in
[https://github.com/kubernetes/klog/pull/281](https://github.com/kubernetes/klog/pull/281)
- log filter: ignored by V, used during log call by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/290](https://github.com/kubernetes/klog/pull/290)
- SetLogger/ClearLogger/SetLogFilter cleanup by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/289](https://github.com/kubernetes/klog/pull/289)
- fixes for PR
[#&open-telemetry#8203;280](https://github.com/kubernetes/klog/issues/280),
refactoring, textlogger, unit test by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/287](https://github.com/kubernetes/klog/pull/287)
- klogr verbosity by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/295](https://github.com/kubernetes/klog/pull/295)
- test: fix Go version matrix by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/298](https://github.com/kubernetes/klog/pull/298)
- handle panics in MarshalLog, Error, String by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/299](https://github.com/kubernetes/klog/pull/299)
- Fix goroutine leak: make flushDaemon stoppable by
[@&open-telemetry#8203;katexochen](https://github.com/katexochen) in
[https://github.com/kubernetes/klog/pull/293](https://github.com/kubernetes/klog/pull/293)
- structured logging: replacing Fatal/Exit/etc. without loss of flushing
by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/303](https://github.com/kubernetes/klog/pull/303)
- contextual logging by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/296](https://github.com/kubernetes/klog/pull/296)
- remove side effects of tests by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/305](https://github.com/kubernetes/klog/pull/305)
- tests: stop testing with Go 1.14 by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/304](https://github.com/kubernetes/klog/pull/304)

#### New Contributors

- [@&open-telemetry#8203;jklaw90](https://github.com/jklaw90) made their first
contribution in
[https://github.com/kubernetes/klog/pull/283](https://github.com/kubernetes/klog/pull/283)
- [@&open-telemetry#8203;s3rj1k](https://github.com/s3rj1k) made their first
contribution in
[https://github.com/kubernetes/klog/pull/280](https://github.com/kubernetes/klog/pull/280)
- [@&open-telemetry#8203;cocaccola](https://github.com/cocaccola) made their first
contribution in
[https://github.com/kubernetes/klog/pull/270](https://github.com/kubernetes/klog/pull/270)
- [@&open-telemetry#8203;noaabarki](https://github.com/noaabarki) made their first
contribution in
[https://github.com/kubernetes/klog/pull/281](https://github.com/kubernetes/klog/pull/281)
- [@&open-telemetry#8203;katexochen](https://github.com/katexochen) made their first
contribution in
[https://github.com/kubernetes/klog/pull/293](https://github.com/kubernetes/klog/pull/293)

**Full Changelog**:
kubernetes/klog@v2.40.1...v2.50.0

###
[`v2.40.1`](https://github.com/kubernetes/klog/releases/tag/v2.40.1):
Prepare klog release for Kubernetes v1.24 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.40.0...v2.40.1)

#### What's Changed

- Using OS targeted go files to separate out the username logic. by
[@&open-telemetry#8203;phillipsj](https://github.com/phillipsj) in
[https://github.com/kubernetes/klog/pull/271](https://github.com/kubernetes/klog/pull/271)
- Recover from nil pointers when logging by
[@&open-telemetry#8203;dims](https://github.com/dims) in
[https://github.com/kubernetes/klog/pull/279](https://github.com/kubernetes/klog/pull/279)

#### New Contributors

- [@&open-telemetry#8203;phillipsj](https://github.com/phillipsj) made their first
contribution in
[https://github.com/kubernetes/klog/pull/271](https://github.com/kubernetes/klog/pull/271)

**Full Changelog**:
kubernetes/klog@v2.40.0...v2.40.1

###
[`v2.40.0`](https://github.com/kubernetes/klog/releases/tag/v2.40.0):
Prepare klog release for Kubernetes v1.24

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.30.0...v2.40.0)

#### What's Changed

- structured logging: support values with line breaks by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/273](https://github.com/kubernetes/klog/pull/273)
- Fix klog lock release on panic error by
[@&open-telemetry#8203;astraw99](https://github.com/astraw99) in
[https://github.com/kubernetes/klog/pull/272](https://github.com/kubernetes/klog/pull/272)
- add format test for KObjs by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/276](https://github.com/kubernetes/klog/pull/276)
- add Verbose.InfoSDepth by [@&open-telemetry#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/277](https://github.com/kubernetes/klog/pull/277)

#### Known Issues

-
[https://github.com/kubernetes/klog/issues/278](https://github.com/kubernetes/klog/issues/278)

#### New Contributors

- [@&open-telemetry#8203;astraw99](https://github.com/astraw99) made their first
contribution in
[https://github.com/kubernetes/klog/pull/272](https://github.com/kubernetes/klog/pull/272)

**Full Changelog**:
kubernetes/klog@v2.30.0...v2.40.0

###
[`v2.30.0`](https://github.com/kubernetes/klog/releases/tag/v2.30.0):
Prepare klog release for Kubernetes v1.23 (take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.20.0...v2.30.0)

#### What's Changed

- Fix logcheck exit function by
[@&open-telemetry#8203;luyou86](https://github.com/luyou86) in
[https://github.com/kubernetes/klog/pull/265](https://github.com/kubernetes/klog/pull/265)
- custom marshaler for ObjectRef by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/266](https://github.com/kubernetes/klog/pull/266)

#### New Contributors

- [@&open-telemetry#8203;luyou86](https://github.com/luyou86) made their first
contribution in
[https://github.com/kubernetes/klog/pull/265](https://github.com/kubernetes/klog/pull/265)

**Full Changelog**:
kubernetes/klog@v2.20.0...v2.30.0

###
[`v2.20.0`](https://github.com/kubernetes/klog/releases/tag/v2.20.0):
Prepare klog release for Kubernetes v1.23

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.10.0...v2.20.0)

Changes are here :
kubernetes/klog@v2.10.0...v2.20.0

since we moved to logr v1.0.0, there are incompatible changes:

    - klogger.Enabled: changed from func() bool to func(int) bool
- klogger.Info: changed from func(string, ...interface{}) to func(int,
string, ...interface{})
    - klogger.V: removed
- klogger.WithCallDepth: changed from func(int)
github.com/go-logr/logr.Logger to func(int)
github.com/go-logr/logr.LogSink
- klogger.WithName: changed from func(string)
github.com/go-logr/logr.Logger to func(string)
github.com/go-logr/logr.LogSink
- klogger.WithValues: changed from func(...interface{})
github.com/go-logr/logr.Logger to func(...interface{})
github.com/go-logr/logr.LogSink

[`83653a6`](https://github.com/kubernetes/klog/commit/83653a6deebf)
Update to newest versions of golang 1.17.x
[`d648c2e`](https://github.com/kubernetes/klog/commit/d648c2e42d30)
fix file-based filtering symbolization
[`8ee3d65`](https://github.com/kubernetes/klog/commit/8ee3d652c96b)
export ClearLogger
[`4171f3c`](https://github.com/kubernetes/klog/commit/4171f3c1be1b)
Switching to logr tag v1.0.0
[`9ab3c2b`](https://github.com/kubernetes/klog/commit/9ab3c2b56cb2)
add serathius as approvers of klog

###
[`v2.10.0`](https://github.com/kubernetes/klog/releases/tag/v2.10.0):
One more change to support 1.22 release

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.9.0...v2.10.0)

Changes are here :
kubernetes/klog@v2.9.0...v2.10.0

new function added:

    func KObjs(arg interface{}) []ObjectRef

###
[`v2.9.0`](https://github.com/kubernetes/klog/releases/tag/v2.9.0):
Prepare release for Kubernetes v1.22

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.8.0...v2.9.0)

Changes are here :
kubernetes/klog@v2.8.0...v2.9.0

[`6a9ef3f`](https://github.com/kubernetes/klog/commit/6a9ef3fa9a15)
fix typo
[`59f7cb5`](https://github.com/kubernetes/klog/commit/59f7cb505f58)
fix byte array display in InfoS and ErrorS
[`cf22f1e`](https://github.com/kubernetes/klog/commit/cf22f1e79721)
Call logr with call depth
[`e95c7e3`](https://github.com/kubernetes/klog/commit/e95c7e303755)
make SetLogger thread-safe
[`2728fe1`](https://github.com/kubernetes/klog/commit/2728fe192acc)
check usage of format specifier in structured log func
[`a18bc97`](https://github.com/kubernetes/klog/commit/a18bc976a212)
Fix by pr suggestions
[`4e4135c`](https://github.com/kubernetes/klog/commit/4e4135c3dd8a)
Add check for InfoS & ErrorS parameters

###
[`v2.8.0`](https://github.com/kubernetes/klog/releases/tag/v2.8.0):
Bug fixes for structured logging for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.7.0...v2.8.0)

###
[`v2.7.0`](https://github.com/kubernetes/klog/releases/tag/v2.7.0):
Miscellaneous fixes for structured logging for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.6.0...v2.7.0)

Changes are here :
kubernetes/klog@v2.6.0...v2.7.0

###
[`v2.6.0`](https://github.com/kubernetes/klog/releases/tag/v2.6.0):
Adding a linter for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.5.0...v2.6.0)

Changes are here :
kubernetes/klog@v2.5.0...v2.6.0

please see
https://github.com/kubernetes/klog/tree/master/hack/tools/logcheck

###
[`v2.5.0`](https://github.com/kubernetes/klog/releases/tag/v2.5.0):
Prepare release for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.4.0...v2.5.0)

Changes are here :
kubernetes/klog@v2.4.0...v2.5.0

klog.go has new API:

+func ErrorSDepth(depth int, err error, msg string, keysAndValues
...interface{}) {
+func InfoSDepth(depth int, msg string, keysAndValues ...interface{}) {

klogr/klogr.go has new API:

    func (l klogger) WithCallDepth(depth int) logr.Logger {
    func NewWithOptions(options ...Option) logr.Logger {
    func WithFormat(format Format) Option {

###
[`v2.4.0`](https://github.com/kubernetes/klog/releases/tag/v2.4.0):
Prepare release for Kubernetes v1.20

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.3.0...v2.4.0)

Changes are here :
kubernetes/klog@v2.3.0...v2.4.0

###
[`v2.3.0`](https://github.com/kubernetes/klog/releases/tag/v2.3.0):
Fix Typo-ed Method Error -&gt; ErrorS

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.2.0...v2.3.0)

Changes are here :
kubernetes/klog@v2.2.0...v2.3.0

###
[`v2.2.0`](https://github.com/kubernetes/klog/releases/tag/v2.2.0):
Dependency update and bugfix for InfoS

[Compare
Source](https://github.com/kubernetes/klog/compare/2.1.0...v2.2.0)

- [`2e691eb`](https://github.com/kubernetes/klog/commit/2e691eb3eeb3)
Fix missing fields in verbose InfoS
- [`966c986`](https://github.com/kubernetes/klog/commit/966c98681ca0)
feat use go-logr v0.2.0

Changes are here :
kubernetes/klog@v2.1.0...v2.2.0

###
[`v2.1.0`](https://github.com/kubernetes/klog/releases/tag/v2.1.0):
Better support for Structured Logging

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.0.0...2.1.0)

We are now enforcing API compatibility, added Windows based tests, and
have tweaked the structured logging methods after some real world
experience updating kubernetes main repo.

- [`bbd9ca1`](https://github.com/kubernetes/klog/commit/bbd9ca1) Add
tests for error in InfoS
- [`1ccc0e1`](https://github.com/kubernetes/klog/commit/1ccc0e1) fix
imported bug time encode format form kvlistFormat
- [`dd4d1a6`](https://github.com/kubernetes/klog/commit/dd4d1a6) fix
typo in README.md
- [`49123d4`](https://github.com/kubernetes/klog/commit/49123d4)
ErrorS(nil, ...) should call loggr.Error(nil, ...)
- [`5b199cd`](https://github.com/kubernetes/klog/commit/5b199cd) Fix
documentation for V(level)
- [`d1eb30f`](https://github.com/kubernetes/klog/commit/d1eb30f) Add
apidiff script to check go signature changes
- [`dc505bf`](https://github.com/kubernetes/klog/commit/dc505bf)
Switch slack channel to #klog
- [`a47ebb9`](https://github.com/kubernetes/klog/commit/a47ebb9) Add
example for co-existence of klog v1 and v2
- [`134f148`](https://github.com/kubernetes/klog/commit/134f148)
logName(): lazily lookup userName instead of on init()
- [`db06a1b`](https://github.com/kubernetes/klog/commit/db06a1b) fix
serialization of special html chars
- [`5727d2a`](https://github.com/kubernetes/klog/commit/5727d2a) Fix
Windows integration tests
- [`edbc1d3`](https://github.com/kubernetes/klog/commit/edbc1d3)
test(\*): TestRollover failed randomly on Windows
- [`6f99060`](https://github.com/kubernetes/klog/commit/6f99060) Add
LogToStderr, a programatic way to log exclusively to stderr or not

###
[`v2.0.0`](https://github.com/kubernetes/klog/releases/tag/v2.0.0):
Release to support Kubernetes v1.19

[Compare
Source](https://github.com/kubernetes/klog/compare/v1.0.0...v2.0.0)

Beware of type change: `Verbose`

New Methods:

-   `SetLogger` (override logger to set a custom implementation)
-   `InfoS` (structured logging)
-   `ErrorS` (structured logging)

Changes are here :
kubernetes/klog@v2.0.0-rc.1...v2.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Yang Song <songy23@users.noreply.github.com>
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants