aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-27Use Utils.checkNotNull instead of writing the null check. (#1385)Bogdan Drutu
2018-08-27Start adding log correlation for Log4j. (#1371)sebright
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.
2018-08-26Access current span using gRPC context key in ↵sebright
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.
2018-08-22Add missing Javadoc. (#1383)Yang Song
2018-08-21Metrics: Combine TimeSeriesCumulative and TimeSeriesGauge. (#1380)Yang Song
2018-08-21Extract logic about current state in internal class. (#1381)Bogdan Drutu
2018-08-20Implement CurrentStatsState using atomic variables. (#1377)Bogdan Drutu
* Implement CurrentStatsState using atomic variables. * Ignore findbugs warning and add changelog comments.
2018-08-20Make an internal function static. (#1375)Yang Song
* Make an internal function static. * Make other functions static too.
2018-08-20Remove match pattern from MutableAggregation. (#1372)Bogdan Drutu
* Remove match pattern from MutableAggregation. * Update comments in MutableAggregation.
2018-08-20Build: Update Cloud Auth, Beta and GA versions. (#1374)Yang Song
2018-08-19Use the internal get version for getting the current state. (#1373)Bogdan Drutu
2018-08-18 Update all targets to at least java7 and android14 (#1367)Bogdan Drutu
* Update all targets to at least java7 and android14 * Change code to be android14 compatible. * Select a specific version for each signature.
2018-08-17Fix stats to metrics implementation. (#1368)Bogdan Drutu
* Fix stats to metrics implementation. * Fix imports and logic to handle gauges. * Fix checker framework * fix style.
2018-08-16Fix deprecation warnings in OpenCensusTraceLoggingEnhancerTest.java. (#1370)sebright
2018-08-16checkstyle: 8.0 -> 8.12 (#1369)sebright
This commit also merges new changes to checkstyle.xml and fixes new checkstyle warnings related to Javadocs.
2018-08-15Stats: Register MetricProducer in Stats-impl. (#1348)Yang Song
* Stats: Implement MetricProducer in Stats. * Add unit tests. * Remove MetricProduce from Stats API. Register it statically in the impl.
2018-08-14Add implementation for gauges. (#1365)Bogdan Drutu
* Add implementation for gauges. * Remove usage of internal class in implcore tests.
2018-08-14Ignore VarInt for coverage. (#1366)Bogdan Drutu
2018-08-13 Metrics: Implement ExportComponent, make ProducerManager abstract. (#1347)Yang Song
* Metrics: Implement ExportComponent, make ProducerManager abstract. * Metrics: Add impl and impllite. * Resolve two TODOs. * Fix import path, leave a TODO for getMetricRegistry. * Make NoopMetricProducerManager private. Add missing since tag.
2018-08-11Fix metrics tests by adding the RunWith annotation. (#1364)Bogdan Drutu
2018-08-10Metrics: Move metrics to opencensus-api. (#1346)Yang Song
* Metrics: Move to api. * Update package-info to warn users on using metrics.
2018-08-10Add support for recording Gauges. (#1344)Bogdan Drutu
* Add support for Gauges in OpenCensus. * Minor comment fix.
2018-08-09Add Tracestate into SpanContext. (#1359)Bogdan Drutu
* Add Tracestate into SpanContext. * Remove empty constructor from Tracestate.Builder * Add info in the changelog.
2018-08-08Metrics: Produce and store Metrics in Stats impl. (#1338)Yang Song
Support recording `Metric`s in stats impl. This works as the following: - When a `View` is registered, convert that `View` to a `MetricDescriptor` and register it; - When a `Measurement` along with a `TagContext` are recorded, convert them into a data row consisting of `LabelValue`s and `Point`s; - If `getMetrics()` is called, convert the `MetricDescriptor`s and data rows into `Metric`s. Then flush all data rows. This PR only contains internal support in the impl. None of these changes are user-visible yet.
2018-08-08Allow users to use custom metric name prefix for Stackdriver (#1057)Yang Song
2018-08-08Remove protected method from final class. (#1363)Bogdan Drutu
2018-08-07gradle wrapper --gradle-version 4.9 (#1360)Bogdan Drutu
2018-08-07Add a warning about try-with-resource to auto-close spans. (#1362)Bogdan Drutu
2018-08-03Minor improvements for Tracestate. (#1358)Bogdan Drutu
2018-08-02Add the initial version of the TraceState class. (#1300)Bogdan Drutu
* Add the initial version of the TraceState class. * Add builder pattern. * Clean API and add tests. * Rename addOrUpdate to set and apply trailing rules for value. * Apply google java format. * Fix check framework.
2018-08-01Add Checker Framework stub file for gRPC Context.Key. (#1357)sebright
The stub file adds Nullable annotations to indicate that Context.Key.get can return null when the key has no default or the key has a nullable value type.
2018-08-01Update README of Stackdriver stats exporter. (#1356)Yang Song
2018-08-01Checker Framework: 2.5.3 -> 2.5.4 (#1355)sebright
2018-08-01Fix incorrect argument to Checker Framework, and fix nullness warnings. (#1354)sebright
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.
2018-08-01Metrics: Move Exemplar to be part of Bucket. (#1353)Yang Song
* Metrics: Move Exemplar to be part of Bucket. * Add tests on getExemplar.
2018-07-31Top-level style class added for Zpages use + Final commit for GSoC... (#1351)ADAM GARZA
2018-07-26Update import control. (#1345)Yang Song
2018-07-26Split findBugs annotations and jsr305 versions. (#1335)Yang Song
2018-07-25Cleanup: Move static util methods to util class. (#1343)Yang Song
* Cleanup: Move static util methods to util class. * Fix checker framework.
2018-07-25Zpages external CSS added and gradle modified to include this resource (#1341)ADAM GARZA
2018-07-24Delete a TODO fixed by #1339. (#1340)sebright
2018-07-24Add links to google-cloud-logging log correlation examples. (#1339)sebright
2018-07-24Merge pull request #1314 from savaki/springMatt Ho
added support for spring annotations
2018-07-24refactored Handler.proceed as per suggestions from @bogdandrutusavaki
2018-07-24Extract constant functions when used in match to reduce number of ↵Bogdan Drutu
allocations. (#1336) * Extract constant functions when used in match to reduce number of allocations. * Fix names for non-constant functions. Fix deprecated warnings. * Add more optimization and clean zipkin exporter. * Use correct name format for RETURN_STRING. * Fix formatting. * Fix import for Nullable.
2018-07-23Metrics: Remove Range from Distribution. (#1337)Yang Song
2018-07-22Zipkin exporter: Use the correct attribute value. (#1334)Yang Song
* Zipkin exporter: Use the correct attribute value. * Add a unit test.
2018-07-21added `@since` to exported classes and methodssavaki
2018-07-21added contrib/spring/README.md to list of README files in RELEASING.mdsavaki
2018-07-21removed test prefix from test methods; updated readmesavaki