Provide a way to override the traceId/spanId/sampled keys in opencensus-contrib-log-correlation-log4j
See the discussion in https://github.com/census-instrumentation/opencensus-java/pull/1371#discussion_r211440499. The library currently uses the keys openCensusTraceId, openCensusSpanId, and openCensusTraceSampled.
An example of a use case for overriding the keys is writing a logging configuration that can work with OpenCensus or Brave. The user could override openCensusTraceId with the key used by Brave (traceId) so that opencensus-contrib-log-correlation-log4j and Brave set the same key-value pair in the LogEvent context. Then the pattern %X{traceId} would work with either tracing library.
Update: The key names are shorter now ("traceId", "spanId", and "traceSampled"), so this feature is also needed for overriding the key names to avoid conflicting with other libraries' keys.
No longer needed based on our specs.
This feature is still needed for overriding the default key names when they conflict with keys added by other libraries, or for purposefully using the same keys as other libraries. It is included in the spec in https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/LogCorrelation.md#key-names-for-tracing-data and is related to these discussions: https://github.com/census-instrumentation/opencensus-specs/pull/181#discussion_r219298220, https://github.com/census-instrumentation/opencensus-java/pull/1371#discussion_r211440499