Module: OmniAuth::Auth0::Telemetry
- Included in:
- Strategies::Auth0
- Defined in:
- lib/omniauth/auth0/telemetry.rb
Overview
Module to provide necessary telemetry for API requests.
Instance Method Summary collapse
-
#telemetry ⇒ Object
Return a telemetry hash to be encoded and sent to Auth0.
-
#telemetry_encoded ⇒ Object
JSON-ify and base64 encode the current telemetry.
Instance Method Details
#telemetry ⇒ Object
Return a telemetry hash to be encoded and sent to Auth0.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/omniauth/auth0/telemetry.rb', line 10 def telemetry telemetry = { name: 'omniauth-auth0', version: OmniAuth::Auth0::VERSION, env: { ruby: RUBY_VERSION } } add_rails_version telemetry end |
#telemetry_encoded ⇒ Object
JSON-ify and base64 encode the current telemetry.
23 24 25 |
# File 'lib/omniauth/auth0/telemetry.rb', line 23 def telemetry_encoded Base64.urlsafe_encode64(JSON.dump(telemetry)) end |