Module: OpenCensus

Defined in:
lib/opencensus.rb,
lib/opencensus/tags.rb,
lib/opencensus/stats.rb,
lib/opencensus/trace.rb,
lib/opencensus/common.rb,
lib/opencensus/config.rb,
lib/opencensus/context.rb,
lib/opencensus/version.rb,
lib/opencensus/stats/view.rb,
lib/opencensus/trace/link.rb,
lib/opencensus/trace/span.rb,
lib/opencensus/tags/config.rb,
lib/opencensus/stats/config.rb,
lib/opencensus/tags/tag_map.rb,
lib/opencensus/trace/config.rb,
lib/opencensus/trace/status.rb,
lib/opencensus/common/config.rb,
lib/opencensus/stats/measure.rb,
lib/opencensus/stats/exemplar.rb,
lib/opencensus/stats/recorder.rb,
lib/opencensus/trace/samplers.rb,
lib/opencensus/stats/exporters.rb,
lib/opencensus/stats/view_data.rb,
lib/opencensus/tags/formatters.rb,
lib/opencensus/trace/exporters.rb,
lib/opencensus/trace/annotation.rb,
lib/opencensus/trace/formatters.rb,
lib/opencensus/trace/time_event.rb,
lib/opencensus/stats/aggregation.rb,
lib/opencensus/stats/measurement.rb,
lib/opencensus/trace/integrations.rb,
lib/opencensus/trace/span_builder.rb,
lib/opencensus/trace/span_context.rb,
lib/opencensus/trace/message_event.rb,
lib/opencensus/stats/aggregation/sum.rb,
lib/opencensus/stats/exporters/multi.rb,
lib/opencensus/trace/exporters/multi.rb,
lib/opencensus/stats/aggregation_data.rb,
lib/opencensus/stats/exporters/logger.rb,
lib/opencensus/stats/measure_registry.rb,
lib/opencensus/tags/formatters/binary.rb,
lib/opencensus/trace/exporters/logger.rb,
lib/opencensus/stats/aggregation/count.rb,
lib/opencensus/trace/formatters/binary.rb,
lib/opencensus/trace/integrations/rails.rb,
lib/opencensus/trace/trace_context_data.rb,
lib/opencensus/trace/truncatable_string.rb,
lib/opencensus/stats/aggregation_data/sum.rb,
lib/opencensus/trace/samplers/probability.rb,
lib/opencensus/trace/samplers/never_sample.rb,
lib/opencensus/stats/aggregation/last_value.rb,
lib/opencensus/stats/aggregation_data/count.rb,
lib/opencensus/trace/formatters/cloud_trace.rb,
lib/opencensus/trace/samplers/always_sample.rb,
lib/opencensus/trace/samplers/rate_limiting.rb,
lib/opencensus/stats/aggregation/distribution.rb,
lib/opencensus/trace/formatters/trace_context.rb,
lib/opencensus/stats/aggregation_data/last_value.rb,
lib/opencensus/trace/integrations/rack_middleware.rb,
lib/opencensus/stats/aggregation_data/distribution.rb,
lib/opencensus/trace/integrations/faraday_middleware.rb

Overview

OpenCensus is a vendor-agnostic single distribution of libraries to provide metrics collection and tracing for your services. See https://opencensus.io/ for general information on OpenCensus.

The OpenCensus module provides a namespace for the Ruby implementation of OpenCensus, including the core libraries for OpenCensus metrics and tracing.

Defined Under Namespace

Modules: Common, Context, Stats, Tags, Trace

Constant Summary collapse

VERSION =

Current OpenCensus version

"0.5.0".freeze

Class Method Summary collapse

Class Method Details

.configureObject

Configure OpenCensus. Most configuration parameters are defined in subconfigurations that live under this main configuration. See, for example, OpenCensus::Trace.configure.

If the OpenCensus Railtie is installed in a Rails application, the toplevel configuration object is also exposed as config.opencensus.

Generally, you should configure this once at process initialization, but it can be modified at any time.

Example:

OpenCensus.configure do |config|
  config.trace.default_sampler =
    OpenCensus::Trace::Samplers::RateLimiting.new
  config.trace.default_max_attributes = 16
end


42
43
44
45
46
47
48
# File 'lib/opencensus/config.rb', line 42

def configure
  if block_given?
    yield @config
  else
    @config
  end
end