| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Add Soong build modules that are required compile-time and runtime
dependencies of gRPC Java client libraries. Note that the current
grpc-java-core module is imported which explains why there are no
build-time errors.
Test: m opencensus-java-api && m opencensus-java-contrib-grpc-metrics
Bug: 148404241
Change-Id: Ie92d1ca959ca2104bae7b92b4509b42f8e4184f7
|
| |
|
|
|
|
|
|
| |
(#1495)
* Metrics/Metric: Add createWithOneTimeSeries method
* Fix review comments
|
| | |
|
| |
|
|
|
|
|
|
| |
* Metrics/TimeSeries: Add createWithOnePoint method to accept only one point
* Fix reviews
* Minor Fix
|
| |
|
|
|
|
|
|
|
|
| |
* Add dropwizard metrics producer
* Use Summary Type
* Fix reviews
* Fix reviews
|
| | |
|
| |
|
|
|
|
| |
* Contrib: Add opencensus-contrib-opencensus-proto-util.
* Update CHANGELOG.
|
| |
|
|
|
|
|
|
|
| |
This commit adds unit tests for
OpenCensusTraceContextDataInjector.rawContextData(). It also makes several
other minor improvements to the Log4j log correlation tests:
- Puts TestSpan in a separate file for reuse.
- Explicitly sets the SpanSelection in tests, where possible.
- Simplifies the tests by calling ReadOnlyStringMap.toMap().
|
| |
|
|
|
|
| |
* Common: Add an API Functions.returnToString().
* Fix comments and add tests.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #1436.
Log4j's SortedArrayStringMap can contain Object values, but
`SortedArrayStringMap.getValue` has signature `<V> V getValue(String key)` and
unsafely casts the Objects to type `V`. When the OpenCensus ContextDataInjector
returned a SortedArrayStringMap, and then a Log4j ContextMapLookup looked up
values as Strings to insert them into log entries
(https://github.com/apache/logging-log4j2/blob/fa27894c13c3890e4ae545f6b6365ea2e159757c/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/ContextMapLookup.java#L58),
it resulted in a ClassCastException.
This commit fixes the ClassCastException by only inserting String values into
the Log4j SortedArrayStringMap.
|
| |
|
| |
Also update Trace exporters and ZPages, and fix a few typos.
|
| |
|
|
|
| |
This commit also updates the gRPC dependency to 1.13.1 in the
Maven and Gradle examples in order to resolve a dependency
conflict in the Maven build.
|
| |
|
|
|
|
|
| |
This commit improves the thread safety of OpenCensusTraceContextDataInjector by
following the thread safety requirements in the Javadocs of the overridden
methods from ContextDataInjector. It also handles the possibility of
ThreadContext.getThreadContextMap() returning null by adding a Nullable
annotation in a Checker Framework stub file and adding null checks to the code.
|
| | |
|
| |
|
|
| |
This commit adds the internal package to import-control.xml and removes the use
of org.apache.logging.log4j.core.impl.ThreadContextDataInjector.
|
| |
|
|
|
|
|
|
| |
value. (#1420)
* Fix a memory reference issue caused by the fact that we allways appended a new value.
* Add Nullable annotations.
|
| |
|
|
|
|
| |
field. (#1418)
This change is consistent with the change to Log4j log correlation context key
names in #1414.
|
| | |
|
| |
|
|
|
| |
names. (#1414)
For example, this commit renames "openCensusTraceId" to "opencensusTraceId".
|
| |
|
|
|
| |
readme. (#1416)
This commit is a continuation of #1411.
|
| |
|
|
|
|
|
|
| |
log4j2. (#1411)
This commit renames the artifact to opencensus-contrib-log-correlation-log4j2
and renames the package to io.opencensus.contrib.logcorrelation.log4j2. The
name change emphasizes that the artifact only works with Log4j 2 and allows us
to add support for other versions of Log4j in the future.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Initial import of OpenCensus/Sleuth integration.
* Minor fixes for integration with master.
* Adds a README.
* Removes hardcoded dependencies in build file.
* Adds contrib to spring_sleuth file path.
* Updates package names appropriately based on file renames.
* Fixes build paths.
* Fixes for build checks.
* Mark as experimental.
* Minor fixes for build files (space vs tab).
* Minor fixes for build files (space vs tab).
* Update README to absolve Spring Sleuth team of any responsibility for this spring_sleuth plugin.
* Minor fixes for import control (space vs tab).
* Tag public classes @since 0.16
* Adds javadoc for public methods not already documented.
* Updates OpenCensusSleuthTracer to pass nullness checks.
* Fixes for formatting issues.
* Fixes for typos.
* Suppresses the check return value warning added by gRPC.
* Suppresses the check return value warning added by gRPC.
|
| |
|
|
|
|
|
|
|
|
| |
* Contrib/agent: detach() should take the context returned from attach().
* Put a try...finally block after attach.
* Compare context and value in the main thread.
* Remove unnecessary check on context value.
|
| |
|
| |
This change is similar to a change made to Log4j log correlation: https://github.com/census-instrumentation/opencensus-java/pull/1402#discussion_r213934235
|
| |
|
|
| |
(#1405)
|
| | |
|
| |
|
|
|
|
|
|
| |
* Update gRPC version to 0.14.
* Fix fingbugs warning.
* Add more comments about the workaround.
|
| | |
|
| |
|
|
|
|
| |
* Remove guava dependency from the API artifact.
* Make LowerCaseBase16Encoding static and remove import control.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit takes the approach of implementing Log4j's ContextDataInjector. It
inserts three keys into each log event: "`openCensusTraceId`", "`openCensusSpanId`",
and "`openCensusTraceSampled`". The tracing data can be accessed with
LogEvent.getContextData() or included in a layout. See
https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/ContextDataInjector.html.
Here is an example of a pattern layout that includes all three tracing fields
and a log entry that could be produced by the layout:
Pattern layout:
"`%d{HH:mm:ss.SSS} [%t] traceId=%X{openCensusTraceId} spanId=%X{openCensusSpanId} sampled=%X{openCensusTraceSampled} %-5level %logger{36} - %msg%n`"
Log entry:
"`20:45:52.929 [main] traceId=0af7a7bef890695f1c5e85a8e7290164 spanId=d3f07c467ec2fbb2 sampled=true WARN io.opencensus.contrib.logcorrelation.log4j.demo.OpenCensusLog4jLogCorrelationDemo - my log message`"
The ContextDataInjector implementation must be specified with a system property,
i.e.,
"`-Dlog4j2.contextDataInjector=io.opencensus.contrib.logcorrelation.log4j.OpenCensusTraceContextDataInjector`".
The system property
"`io.opencensus.contrib.logcorrelation.log4j.OpenCensusTraceContextDataInjector.spanSelection`"
controls whether tracing data is added to all spans, no spans, or only sampled spans.
|
| |
|
|
|
|
|
|
|
| |
OpenCensusTraceLoggingEnhancer. (#1386)
Avoiding accessing the OpenCensus tracing implementation early in initialization
is more robust. See the discussion in
https://github.com/census-instrumentation/opencensus-java/pull/1371#discussion_r211440915
and
https://github.com/census-instrumentation/opencensus-java/pull/1371#discussion_r211441000.
|
| |
|
|
|
|
|
|
| |
* Update all targets to at least java7 and android14
* Change code to be android14 compatible.
* Select a specific version for each signature.
|
| | |
|
| |
|
|
| |
This commit also merges new changes to checkstyle.xml and fixes new checkstyle
warnings related to Javadocs.
|
| |
|
|
|
|
|
|
| |
* Add Tracestate into SpanContext.
* Remove empty constructor from Tracestate.Builder
* Add info in the changelog.
|
| |
|
|
|
|
| |
709d97aa321d5729988fd63b960bbece04cfba10 modified the -AskipDefs argument to the
Checker Framework (a regular expression) in a way that caused it to skip
checking all files. This commit fixes the regular expression and the new
Checker Framework warnings.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
added support for spring annotations
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|