You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix inconsistent exception logging patterns and add CONTRIBUTING.md guidance
Category A — Remove redundant e.getMessage() where exception is already
passed as the Throwable parameter:
- GrpcExporter.java
- HttpExporter.java
- JaegerRemoteSampler.java (also fix stale FINEST log to pass exception
as Throwable instead of concatenating)
Category B — Pass exception as Throwable instead of stringifying via
getMessage(), so logging frameworks can render full stack traces:
- AutoConfiguredOpenTelemetrySdkBuilder.java
- DeclarativeConfiguration.java
- TracerShim.java
- SdkDoubleHistogram.java
- SdkLongHistogram.java
Add best practice guidance to CONTRIBUTING.md recommending the use of
dedicated logger overloads that accept a Throwable parameter.
Resolves#8228
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+189Lines changed: 189 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,8 +63,197 @@ iterations, scores with error margins) so reviewers can evaluate the change.
63
63
64
64
## User-facing documentation
65
65
66
+
<<<<<<< HEAD
66
67
End-user documentation for the Java SDK lives at
67
68
[opentelemetry.io/docs/languages/java/](https://opentelemetry.io/docs/languages/java/), with
68
69
source in [github.com/open-telemetry/opentelemetry.io](https://github.com/open-telemetry/opentelemetry.io).
69
70
If your change affects user-visible behavior — configuration options, new features, changed
70
71
defaults — please update or open an issue against the documentation there.
72
+
=======
73
+
```bash
74
+
$ ./gradlew spotlessApply
75
+
```
76
+
77
+
To verify code style manually run the following command, which
Please confirm whether the local opentelemetry-java version is consistent with the
238
+
opentelemetry-java version declared in the project that relies on opentelemetry-java.
239
+
If it is inconsistent, `dependencySubstitution` may not take effect.
240
+
241
+
See [the Gradle documentation](https://docs.gradle.org/current/userguide/composite_builds.html#included_build_declaring_substitutions)
242
+
for more information.
243
+
4. If you now build your project, it will use the included build to supply the opentelemetry-java
244
+
artifacts, ignoring any version declarations. Use the prefix `:DIRECTORY:` to refer to
245
+
tasks/projects within the included build, where DIRECTORY is the name of the directory in the
246
+
included build (only the part after the last `/`).
247
+
5. Here are some issues and solutions ([discussions/6551](https://github.com/open-telemetry/opentelemetry-java/discussions/6551))
248
+
you may encounter that may be helpful to you.
249
+
250
+
### Updating the OTLP protobufs
251
+
252
+
OTLP protobuf Java bindings are published via
253
+
the [opentelemetry-proto-java](https://github.com/open-telemetry/opentelemetry-proto-java)
254
+
repository. This project does not use the java bindings, but does use the `.proto` files that are
255
+
published in the binding jar by that project.
256
+
257
+
To update the OTLP protobuf version,
258
+
first [release a new version of the java bindings](https://github.com/open-telemetry/opentelemetry-proto-java/blob/main/RELEASING.md)
259
+
then simply update the dependency version that this project has on that jar.
Copy file name to clipboardExpand all lines: sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/AutoConfiguredOpenTelemetrySdkBuilder.java
Copy file name to clipboardExpand all lines: sdk-extensions/autoconfigure/src/test/java/io/opentelemetry/sdk/autoconfigure/AutoConfiguredOpenTelemetrySdkTest.java
Copy file name to clipboardExpand all lines: sdk-extensions/incubator/src/main/java/io/opentelemetry/sdk/extension/incubator/fileconfig/DeclarativeConfiguration.java
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -284,8 +284,7 @@ static <M, R> R createAndMaybeCleanup(
Copy file name to clipboardExpand all lines: sdk-extensions/jaeger-remote-sampler/src/main/java/io/opentelemetry/sdk/extension/trace/jaeger/sampler/JaegerRemoteSampler.java
0 commit comments