Added default ProGuard / R8 rules (@Marcono1234, #2397, #2420; @sgjesse, #2448; @sfreilich)
If you are using ProGuard or R8 (for example for Android projects) you might not need any special Gson configuration anymore if your classes have a no-args constructor and use @SerializedName for their fields.
On Android, Gson now requires API level 21 or newer
Added new Strictness API (@marten-voorberg & fellow students, #2437)
Some of Gson's API is still lenient by default, but you can now use the newly added methods GsonBuilder#setStrictness, JsonReader#setStrictness and JsonWriter#setStrictness with Strictness.STRICT to override this behavior and to instead strictly adhere to the JSON specification when parsing.
New FormattingStyle class to allow configuring line breaks in JSON output (@mihnita, #2231)
Can be set using GsonBuilder#setFormattingStyle and JsonWriter#setFormattingStyle.
TypeToken can no longer capture type variables by default (@Marcono1234, #2376)
This was previously a common source of issues. The newly thrown exception refers to a Troubleshooting Guide article which explains this in more detail and provides suggestions for updating affected code.
Added serialization support for anonymous and local classes with a custom adapter (@Marcono1234, #2498)
This affects for example List implementations returned by libraries such as Guava which are implemented as anonymous class, which were previously serialized as null. Anonymous and local classes without custom adapter will still be serialized as null.
Added dependency on com.google.errorprone:error_prone_annotations
Your project can use Maven or Gradle dependency exclusions to remove the transitive error_prone_annotations dependency from Gson. Or if you are manually maintaining dependencies as JARs in your project you can omit error_prone_annotations. And it should still work correctly.
But Gson itself does declare it as a required dependency, and if you don't perform any custom configuration, then Maven or Gradle will by default try to download and use it.
Fixed Gson#getDelegateAdapter not working properly for @JsonAdapter (@Marcono1234, #2435)
Note that null is now not allowed as skipPast value anymore, which was previously allowed but undocumented.
Fixed GsonBuilder not rejecting type adapters for Object and JsonElement, whose default adapters cannot be overridden (@sachinp97; #2479)
Fixed no limits being enforced when deserializing BigDecimal and BigInteger (@Marcono1234, #2510)
The new limits prevent potential performance problems when user code uses the deserialized numbers. Gson itself was and is not affected by these performance problems. The limits should be high enough to not cause issues for most use cases, but feedback is appreciated.
Fixed GsonBuilder#setDateFormat not rejecting invalid date formats (@Carpe-Wang, #2538)
Fixed GsonBuilder#setDateFormat not rejecting invalid date styles (@Marcono1234, #2545)
Zipkin 3.4 adds support for OpenSearch v2 using the same ES_ prefixed environment variables used for Elasticsearch. Thanks a lot to @reta for all the engineering that results in this being simple to use!
Note: Zipkin Dependencies 3.2 is the corresponding first release of the dependencies job that supports OpenSearch v2.
Zipkin 3.3.1 is a maintenance release that notably updates to Spring Boot 3.3 and Alpine Linux 3.20.
This also adds the test docker image ghcr.io/openzipkin/zipkin-opensearch2, which is used to test the upcoming Zipkin 3.4 release which will support OpenSearch 2 in addition to existing storage backends.
Zipkin 3.3 is maintenance only with no new features since the last release.
Notably, this raises the floor JRE version of libraries except core from 11 to 17. The only reason we had 11 in the past was due to Spark limitations that affected zipkin-dependencies. This was resolved by Spark 3.4, which we were recently able to upgrade to once libraries we used all became compatible with it.
Also, we now run Trivy security and misconfiguration scanner on every commit, in support of our new security policy. This policy was designed around the norms of our maintenance community, which is currently 100pct volunteers with no dedicated paid time for the project.
We appreciate Trivy adjusting the open source code for the somewhat unique needs of tracing projects: it requires running tests on old library versions. Their open mindedness in classification policy was critical in coming up with a policy at all. We need to focus the small amount of time we have available to the most important alerts, and not the noise: now we can.
Zipkin 3.2.1 fixes a regression where libraries that improve network performance (netty-tcnative) were not included in the main zipkin jar, resulting in unpublished Docker images.
Zipkin 3.2 improves accessibility blindness and language controls.
Before, there was no way to control "dark mode". Also, the color scheme lacked contrast and other features to support vision accessibility. @giaroc's first commit to zipkin knocked this out of the park, resulting in an easier to read and control UI.
Zipkin 3.1.1 is a hardening release, notably polishing out some UI glitches and experience problems for Cassandra users. Thanks a lot for all the feedback and patience, as we delayed this patch until we felt confident glitches were handled in a way that would be easy to diagnose in the future!
UI Fixes
Users and maintainers have noticed a few glitches since our UI moved from the abandoned react-scripts to vite for packaging. We think we've corrected everything at this point, but please reach out if you believe we didn't.
Fixed our test image ghcr.io/openzipkin/zipkin-ui resulting in 404s
Fixed handling of the env variable ZIPKIN_UI_BASEDIR, used when zipkin is deployed in a proxying
added a new ghcr.io/openzipkin/zipkin-uiproxy image that proves this works.
A lot of folks pitched in here, special thanks to @ujo-trackunit who uses this and provided a lot of insight leading to the fix, as well @SamTV12345@reta and @anuraaga who all took time away to contribute towards resolution.
Cassandra and SASI default change
When STORAGE_TYPE=cassandra3, zipkin uses a feature called SASI for search features. This was enabled by default in Cassandra 3.11+, but in 4.x it became disabled by default.
Unlike schema settings, sasi_indexes_enabled: true is not something zipkin can change. Before, we weren't logging this critical setup problem, so users upgrading from cassandra 3 to 4 had a very hard time figuring it out. We now properly log what's going on, with more context. Ideally, this will help folks correct their configuration.
Here's an example, if you use the default cassandra docker image which has SASI disabled
Zipkin Reporter 3.4 deprecates AsyncReporter/SpanHandlerqueuedMaxBytes and disables it by default.
When introduced, AsyncReporter had three ways to trigger a queue flush:
queuedMaxSpans - when the number of spans in the queue exceeds a threshold
queuedMaxBytes - when the size of the spans in the queue exceeds a threshold
messageTimeout - when a span has been in the queue longer than a threshold
queuedMaxBytes was deprecated because requires time in the critical path, to calculate the size of a span to make sure it doesn't breach the threshold. This is problematic in tools that check for pinning, like Virtual Threads.
Zipkin Reporter 3.3 adds a BaseHttpSender type, which eases http library integration. It also adds HttpEndpointSupplier which supports dynamic endpoint discovery such as from Eureka, as well utilities to create constants or rate-limit suppliers. Finally, brave users get a native PROTO3 encoder through the new MutableSpanBytesEncoder type.
These features were made in support of spring-boot, but available to any user with no new dependencies. For example, the PROTO encoder adds no library dependency, even if it increases the size of zipkin-reporter-brave by a couple dozen KB. A lion's share of thanks goes to @reta and @anuraaga who were on design and review duty for several days leading to this.
Here's an example of pulling most of these things together, integrating a sender with spring-cloud-loadbalancer (a client-side loadbalancer library).
This endpoint supplier will get the configuration endpoint value and look up the next target to use with the loadBalancerClient. The rate limiter will ensure a gap of 30 seconds between queries. While below is hard-coded, it covers some routine advanced features formerly only available in spring-cloud-sleuth. Now, anyone can use them!
@Configuration(proxyBeanMethods = false)
public class ZipkinDiscoveryConfiguration {
@Bean HttpEndpointSupplier.Factory loadbalancerEndpoints(LoadBalancerClient loadBalancerClient) {
LoadBalancerHttpEndpointSupplier.Factory httpEndpointSupplierFactory =
new LoadBalancerHttpEndpointSupplier.Factory(loadBalancerClient);
// don't ask more than 30 seconds (just to show)
return HttpEndpointSuppliers.newRateLimitedFactory(httpEndpointSupplierFactory, 30);
}
record LoadBalancerHttpEndpointSupplier(LoadBalancerClient loadBalancerClient, URI virtualURL)
implements HttpEndpointSupplier {
record Factory(LoadBalancerClient loadBalancerClient) implements HttpEndpointSupplier.Factory {
@Override public HttpEndpointSupplier create(String endpoint) {
return new LoadBalancerHttpEndpointSupplier(loadBalancerClient, URI.create(endpoint));
}
}
@Override public String get() {
ServiceInstance instance = loadBalancerClient.choose(virtualURL.getHost());
if (instance != null) {
return instance.getUri() + virtualURL.getPath();
}
throw new IllegalArgumentException(virtualURL.getHost() + " is not registered");
}
@Override public void close() {
}
Brave 6.0.2 fixes a propagation glitch on kafka streams processors using context.forward(). Tons of thanks to @frosiere for the help on this! We also changed how dependencies are managed so that less false-positives show up due to our backwards compatability testing. We appreciate your continued use and feedback!
Brave 6.0.1 simplifies internals of the json encoder and kafka-streams instrumentation. It also fixes a bug where a Tag<Throwable> passed to MutableSpanBytesEncoder.zipkinJsonV2 always used the key "error" even when set to something else. Finally @reta fixed a flakey JMS integration test which was plaguing our CI builds!
Brave 6 removes all modules and functions deprecated in Brave 5.x. It no longer has any dependency on io.zipkin.zipkin2:zipkin. Special thanks to @reta and @anuraaga for a lot of review support leading to this release!
No more deprecated functions
The final release of Brave 5 with deprecated functions was 5.18.1. Removing these functions was the only way to decouple Brave from zipkin's core library (io.zipkin.zipkin2:zipkin). However, this does not change Brave's floor Java 6 support. We still integration test this via the brave-example repository.
Here's an example of a working Java 6 and Spring 2.5 application, which is 280KB smaller due to use of the lean combination of Brave 6 and Zipkin Reporter 3.x:
To fully remove a zipkin core library dependency from your traced applications, use io.zipkin.reporter2:zipkin-reporter-brave3.xAsyncZipkinSpanHandler. This is described in the zipkin-reporter README. You can expect currently maintained frameworks to do this on your behalf.
Thanks for your patience with the major upgrade. Things like this allow easier maintenance and a longer life for Brave, particularly as zipkin-server moves ahead with later Java versions.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the trace-java-client-gradle-deps group with 5 updates in the /trace-java-client directory:
2.10.1
2.11.0
1.0.0
1.0.1
2.25.2
3.4.0
2.17.1
3.4.0
5.17.0
6.0.3
Updates
com.google.code.gson:gson
from 2.10.1 to 2.11.0Release notes
Sourced from com.google.code.gson:gson's releases.
... (truncated)
Commits
828a97b
[maven-release-plugin] prepare release gson-parent-2.11.093bc0f2
Skip signing graal-native-test module. (#2675)b153ca1
[maven-release-plugin] rollback the release of gson-parent-2.11.00e3d2aa
[maven-release-plugin] prepare for next development iteration545b802
[maven-release-plugin] prepare release gson-parent-2.11.08bfdbb4
Guarantee thatJsonElement.toString()
produces JSON (#2659)9008b09
Extend Troubleshooting Guide with some ProGuard / R8 information (#2656)05652c3
Document that other JVM languages are not fully supported (#2666)454a491
Improved Long-Double Number Policy (#2674)570d911
Bump the github-actions group with 4 updates (#2671)Updates
io.opentracing.brave:brave-opentracing
from 1.0.0 to 1.0.1Commits
Updates
io.zipkin.zipkin2:zipkin
from 2.25.2 to 3.4.0Release notes
Sourced from io.zipkin.zipkin2:zipkin's releases.
... (truncated)
Commits
61e65dc
[maven-release-plugin] prepare release 3.4.0fb8d8b9
bumps dependencies prior to 3.4 release (#3772)ed594e7
Supports OpenSearch V2 through ES_* environment variables (#3765)00b1355
[maven-release-plugin] prepare for next development iteration403602f
[maven-release-plugin] prepare release 3.3.1e2581c8
bumps docker images notably to alpine 3.20.0 (#3771)e8e4bfa
Update to Spring Boot 3.3.0 (#3769)3377f35
Add Zipkin support of OpenSearch storage (add Docker images) (#3766)e9725af
deps: bumps to latest versions (#3767)f651485
[maven-release-plugin] prepare for next development iterationUpdates
io.zipkin.reporter2:zipkin-sender-okhttp3
from 2.17.1 to 3.4.0Release notes
Sourced from io.zipkin.reporter2:zipkin-sender-okhttp3's releases.
... (truncated)
Commits
0af48b8
[maven-release-plugin] prepare release 3.4.022b6727
Adds spring-beans context test and defaults to Spring 5 (#265)fcc67bb
Deprecates AsyncReporter/SpanHandler queuedMaxBytes (#264)e54db40
ci: adds lint check, fixes yaml formatting and unnecessary auth (#263)f30ee66
AsyncReporter/SpanHandler: make queuedMaxBytes=0 disable pre-flight size chec...0c62f8b
benchmarks: moves dependency scope to test (#262)939b6e4
deps: fix kafka floor JRE to 8 and updates all libs to latest (#261)16686ce
license: removes copyright year and uses SPDX ID (#257)f3b9cf7
[maven-release-plugin] prepare for next development iteration9b4489e
[maven-release-plugin] prepare release 3.3.0Updates
io.zipkin.brave:brave
from 5.17.0 to 6.0.3Release notes
Sourced from io.zipkin.brave:brave's releases.
... (truncated)
Commits
95ae4c2
[maven-release-plugin] prepare release 6.0.308e8e39
Fixes thread safety issue in Tag.tag (#1434)57f27e2
license: removes copyright year and uses SPDX ID (#1433)170c79f
Speeds up dubbo tests, aligns conventions and bumps deps (#1432)ef6fbbd
Adds support for org.mongodb:mongodb-driver-core v5 (#1431)fe3c8b4
fixes bug setting service names to empty (#1428)69e30f3
Adds BaggagePropagation benchmarks for decorate (#1425)b7ece7b
Consolidates notes on "extra" data (#1424)d8dc495
benchmarks: moves dependency scope to test (#1422)5552507
[maven-release-plugin] prepare for next development iterationDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show