Module: OpenCensus
- Defined in:
- 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/trace/link.rb,
lib/opencensus/trace/span.rb,
lib/opencensus/trace/config.rb,
lib/opencensus/trace/status.rb,
lib/opencensus/common/config.rb,
lib/opencensus/trace/samplers.rb,
lib/opencensus/trace/exporters.rb,
lib/opencensus/trace/annotation.rb,
lib/opencensus/trace/formatters.rb,
lib/opencensus/trace/time_event.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/trace/exporters/multi.rb,
lib/opencensus/trace/exporters/logger.rb,
lib/opencensus/trace/samplers/max_qps.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/trace/samplers/probability.rb,
lib/opencensus/trace/samplers/never_sample.rb,
lib/opencensus/trace/formatters/cloud_trace.rb,
lib/opencensus/trace/samplers/always_sample.rb,
lib/opencensus/trace/formatters/trace_context.rb,
lib/opencensus/trace/integrations/rack_middleware.rb,
lib/opencensus/trace/integrations/faraday_middleware.rb
Overview
Copyright 2017 OpenCensus Authors
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Defined Under Namespace
Modules: Common, Context, Stats, Tags, Trace
Constant Summary collapse
- VERSION =
Current OpenCensus version
"0.3.0".freeze
Class Attribute Summary collapse
-
.config ⇒ Object
readonly
Get the current configuration.
Class Method Summary collapse
-
.configure ⇒ Object
Configure OpenCensus.
Class Attribute Details
.config ⇒ Object (readonly)
Get the current configuration.
52 53 54 |
# File 'lib/opencensus/config.rb', line 52 def config @config end |
Class Method Details
.configure ⇒ Object
Configure OpenCensus. Most configuration parameters are part of subconfigurations that live under this main configuration.
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::AlwaysSample.new
config.trace.default_max_attributes = 16
end
40 41 42 43 44 45 46 |
# File 'lib/opencensus/config.rb', line 40 def configure if block_given? yield @config else @config end end |