ExInsights v0.5.1 ExInsights.Data.Envelope View Source

Track request envelope

Envelope data looks like this

{
  "time": "2017-08-24T08:55:56.968Z",
  "iKey": "some-guid-value-key",
  "name": "Microsoft.ApplicationInsights.someguidvaluekey.Event",
  "tags": {
    "ai.session.id": "SLzGH",
    "ai.device.id": "browser",
    "ai.device.type": "Browser",
    "ai.internal.sdkVersion": "javascript:1.0.11",
    "ai.user.id": "V2Yph",
    "ai.operation.id": "VKgP+",
    "ai.operation.name": "/"
  },
  "data": {
    "baseType": "EventData",
    "baseData": {
      "ver": 2,
      "name": "button clicked",
      "properties": {
        "click type": "double click"
      },
      "measurements": {
        "clicks": 2
      }
    }
  }
}

Link to this section Summary

Functions

Creates a new envelope for sending a single tracked item to app insights. Intended for internal use only.

Provides common tags for all track requests. Intended for internal use only.

Link to this section Types

Link to this type

t()

View Source
t() :: %ExInsights.Data.Envelope{
  data: map(),
  iKey: String.t() | nil,
  name: String.t() | nil,
  tags: map(),
  time: String.t()
}

Link to this section Functions

Link to this function

create(data, type, time, tags)

View Source

Creates a new envelope for sending a single tracked item to app insights. Intended for internal use only.

Link to this function

ensure_instrumentation_key_present(envelope)

View Source

Provides common tags for all track requests. Intended for internal use only.

Link to this function

set_instrumentation_key(envelope, instrumentation_key)

View Source