@elasticdash/core 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -179,47 +179,47 @@ declare const configureGlobalLogger: (config: LoggerConfig) => void;
179
179
  declare const resetGlobalLogger: () => void;
180
180
 
181
181
  type ElasticDashEnvVar = "ELASTICDASH_PUBLIC_KEY" | "ELASTICDASH_SECRET_KEY" | "ELASTICDASH_BASE_URL" | "ELASTICDASH_BASEURL" | "ELASTICDASH_TIMEOUT" | "ELASTICDASH_FLUSH_AT" | "ELASTICDASH_FLUSH_INTERVAL" | "ELASTICDASH_TRACING_ENVIRONMENT";
182
- declare const ELASTICDASH_TRACER_NAME = "langfuse-sdk";
182
+ declare const ELASTICDASH_TRACER_NAME = "elasticdash-sdk";
183
183
  declare const ELASTICDASH_SDK_VERSION: string;
184
184
  declare const ELASTICDASH_SDK_NAME = "javascript";
185
185
  declare const ELASTICDASH_SDK_EXPERIMENT_ENVIRONMENT = "sdk-experiment";
186
186
  declare enum LangfuseOtelSpanAttributes {
187
- TRACE_NAME = "langfuse.trace.name",
187
+ TRACE_NAME = "elasticdash.trace.name",
188
188
  TRACE_USER_ID = "user.id",
189
189
  TRACE_SESSION_ID = "session.id",
190
- TRACE_TAGS = "langfuse.trace.tags",
191
- TRACE_PUBLIC = "langfuse.trace.public",
192
- TRACE_METADATA = "langfuse.trace.metadata",
193
- TRACE_INPUT = "langfuse.trace.input",
194
- TRACE_OUTPUT = "langfuse.trace.output",
195
- OBSERVATION_TYPE = "langfuse.observation.type",
196
- OBSERVATION_METADATA = "langfuse.observation.metadata",
197
- OBSERVATION_LEVEL = "langfuse.observation.level",
198
- OBSERVATION_STATUS_MESSAGE = "langfuse.observation.status_message",
199
- OBSERVATION_INPUT = "langfuse.observation.input",
200
- OBSERVATION_OUTPUT = "langfuse.observation.output",
201
- OBSERVATION_COMPLETION_START_TIME = "langfuse.observation.completion_start_time",
202
- OBSERVATION_MODEL = "langfuse.observation.model.name",
203
- OBSERVATION_MODEL_PARAMETERS = "langfuse.observation.model.parameters",
204
- OBSERVATION_USAGE_DETAILS = "langfuse.observation.usage_details",
205
- OBSERVATION_COST_DETAILS = "langfuse.observation.cost_details",
206
- OBSERVATION_PROMPT_NAME = "langfuse.observation.prompt.name",
207
- OBSERVATION_PROMPT_VERSION = "langfuse.observation.prompt.version",
208
- ENVIRONMENT = "langfuse.environment",
209
- RELEASE = "langfuse.release",
210
- VERSION = "langfuse.version",
211
- AS_ROOT = "langfuse.internal.as_root",
212
- EXPERIMENT_ID = "langfuse.experiment.id",
213
- EXPERIMENT_NAME = "langfuse.experiment.name",
214
- EXPERIMENT_DESCRIPTION = "langfuse.experiment.description",
215
- EXPERIMENT_METADATA = "langfuse.experiment.metadata",
216
- EXPERIMENT_DATASET_ID = "langfuse.experiment.dataset.id",
217
- EXPERIMENT_ITEM_ID = "langfuse.experiment.item.id",
218
- EXPERIMENT_ITEM_EXPECTED_OUTPUT = "langfuse.experiment.item.expected_output",
219
- EXPERIMENT_ITEM_METADATA = "langfuse.experiment.item.metadata",
220
- EXPERIMENT_ITEM_ROOT_OBSERVATION_ID = "langfuse.experiment.item.root_observation_id",
221
- TRACE_COMPAT_USER_ID = "langfuse.user.id",
222
- TRACE_COMPAT_SESSION_ID = "langfuse.session.id"
190
+ TRACE_TAGS = "elasticdash.trace.tags",
191
+ TRACE_PUBLIC = "elasticdash.trace.public",
192
+ TRACE_METADATA = "elasticdash.trace.metadata",
193
+ TRACE_INPUT = "elasticdash.trace.input",
194
+ TRACE_OUTPUT = "elasticdash.trace.output",
195
+ OBSERVATION_TYPE = "elasticdash.observation.type",
196
+ OBSERVATION_METADATA = "elasticdash.observation.metadata",
197
+ OBSERVATION_LEVEL = "elasticdash.observation.level",
198
+ OBSERVATION_STATUS_MESSAGE = "elasticdash.observation.status_message",
199
+ OBSERVATION_INPUT = "elasticdash.observation.input",
200
+ OBSERVATION_OUTPUT = "elasticdash.observation.output",
201
+ OBSERVATION_COMPLETION_START_TIME = "elasticdash.observation.completion_start_time",
202
+ OBSERVATION_MODEL = "elasticdash.observation.model.name",
203
+ OBSERVATION_MODEL_PARAMETERS = "elasticdash.observation.model.parameters",
204
+ OBSERVATION_USAGE_DETAILS = "elasticdash.observation.usage_details",
205
+ OBSERVATION_COST_DETAILS = "elasticdash.observation.cost_details",
206
+ OBSERVATION_PROMPT_NAME = "elasticdash.observation.prompt.name",
207
+ OBSERVATION_PROMPT_VERSION = "elasticdash.observation.prompt.version",
208
+ ENVIRONMENT = "elasticdash.environment",
209
+ RELEASE = "elasticdash.release",
210
+ VERSION = "elasticdash.version",
211
+ AS_ROOT = "elasticdash.internal.as_root",
212
+ EXPERIMENT_ID = "elasticdash.experiment.id",
213
+ EXPERIMENT_NAME = "elasticdash.experiment.name",
214
+ EXPERIMENT_DESCRIPTION = "elasticdash.experiment.description",
215
+ EXPERIMENT_METADATA = "elasticdash.experiment.metadata",
216
+ EXPERIMENT_DATASET_ID = "elasticdash.experiment.dataset.id",
217
+ EXPERIMENT_ITEM_ID = "elasticdash.experiment.item.id",
218
+ EXPERIMENT_ITEM_EXPECTED_OUTPUT = "elasticdash.experiment.item.expected_output",
219
+ EXPERIMENT_ITEM_METADATA = "elasticdash.experiment.item.metadata",
220
+ EXPERIMENT_ITEM_ROOT_OBSERVATION_ID = "elasticdash.experiment.item.root_observation_id",
221
+ TRACE_COMPAT_USER_ID = "elasticdash.user.id",
222
+ TRACE_COMPAT_SESSION_ID = "elasticdash.session.id"
223
223
  }
224
224
 
225
225
  /**
@@ -607,7 +607,7 @@ interface Trace$1 {
607
607
  tags: string[];
608
608
  /** Public traces are accessible via url without login */
609
609
  public: boolean;
610
- /** The environment from which this trace originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'. */
610
+ /** The environment from which this trace originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'elasticdash'. */
611
611
  environment: string;
612
612
  }
613
613
 
@@ -709,7 +709,7 @@ interface Observation {
709
709
  usageDetails: Record<string, number>;
710
710
  /** The cost details of the observation. Key is the name of the cost metric, value is the cost in USD. The total key is the sum of all (non-total) cost metrics or the total value ingested. */
711
711
  costDetails: Record<string, number>;
712
- /** The environment from which this observation originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'. */
712
+ /** The environment from which this observation originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'elasticdash'. */
713
713
  environment: string;
714
714
  }
715
715
 
@@ -823,7 +823,7 @@ interface BaseScoreV1 {
823
823
  configId: string | null;
824
824
  /** The annotation queue referenced by the score. Indicates if score was initially created while processing annotation queue. */
825
825
  queueId: string | null;
826
- /** The environment from which this score originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'. */
826
+ /** The environment from which this score originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'elasticdash'. */
827
827
  environment: string;
828
828
  }
829
829
 
@@ -913,7 +913,7 @@ interface BaseScore {
913
913
  configId: string | null;
914
914
  /** The annotation queue referenced by the score. Indicates if score was initially created while processing annotation queue. */
915
915
  queueId: string | null;
916
- /** The environment from which this score originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'. */
916
+ /** The environment from which this score originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'elasticdash'. */
917
917
  environment: string;
918
918
  }
919
919
 
@@ -2528,7 +2528,7 @@ declare namespace index$j {
2528
2528
  * This file was auto-generated by Fern from our API Definition.
2529
2529
  */
2530
2530
  interface GetMediaResponse {
2531
- /** The unique langfuse identifier of a media record */
2531
+ /** The unique elasticdash identifier of a media record */
2532
2532
  mediaId: string;
2533
2533
  /** The MIME type of the media record */
2534
2534
  contentType: string;
@@ -2580,7 +2580,7 @@ interface GetMediaUploadUrlRequest {
2580
2580
  interface GetMediaUploadUrlResponse {
2581
2581
  /** The presigned upload URL. If the asset is already uploaded, this will be null */
2582
2582
  uploadUrl?: string;
2583
- /** The unique langfuse identifier of a media record */
2583
+ /** The unique elasticdash identifier of a media record */
2584
2584
  mediaId: string;
2585
2585
  }
2586
2586
 
@@ -3296,7 +3296,7 @@ interface OtelSpan {
3296
3296
  startTimeUnixNano?: unknown;
3297
3297
  /** End time in nanoseconds since Unix epoch */
3298
3298
  endTimeUnixNano?: unknown;
3299
- /** Span attributes including Langfuse-specific attributes (langfuse.observation.*) */
3299
+ /** Span attributes including Langfuse-specific attributes (elasticdash.observation.*) */
3300
3300
  attributes?: OtelAttribute[];
3301
3301
  /** Span status object */
3302
3302
  status?: unknown;
@@ -3310,7 +3310,7 @@ interface OtelSpan {
3310
3310
  * Key-value attribute pair for resources, scopes, or spans
3311
3311
  */
3312
3312
  interface OtelAttribute {
3313
- /** Attribute key (e.g., "service.name", "langfuse.observation.type") */
3313
+ /** Attribute key (e.g., "service.name", "elasticdash.observation.type") */
3314
3314
  key?: string;
3315
3315
  /** Attribute value */
3316
3316
  value?: OtelAttributeValue;
@@ -3365,7 +3365,7 @@ interface OtelTraceResponse {
3365
3365
  * },
3366
3366
  * scopeSpans: [{
3367
3367
  * scope: {
3368
- * name: "langfuse-sdk",
3368
+ * name: "elasticdash-sdk",
3369
3369
  * version: "2.60.3"
3370
3370
  * },
3371
3371
  * spans: [{
@@ -3376,7 +3376,7 @@ interface OtelTraceResponse {
3376
3376
  * startTimeUnixNano: "1747872000000000000",
3377
3377
  * endTimeUnixNano: "1747872001000000000",
3378
3378
  * attributes: [{
3379
- * key: "langfuse.observation.type",
3379
+ * key: "elasticdash.observation.type",
3380
3380
  * value: {
3381
3381
  * stringValue: "generation"
3382
3382
  * }
@@ -4412,13 +4412,13 @@ interface CreateScoreRequest {
4412
4412
  value: CreateScoreValue;
4413
4413
  comment?: string;
4414
4414
  metadata?: Record<string, unknown>;
4415
- /** The environment of the score. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'. */
4415
+ /** The environment of the score. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'elasticdash'. */
4416
4416
  environment?: string;
4417
4417
  /** The annotation queue referenced by the score. Indicates if score was initially created while processing annotation queue. */
4418
4418
  queueId?: string;
4419
4419
  /** The data type of the score. When passing a configId this field is inferred. Otherwise, this field must be passed or will default to numeric. */
4420
4420
  dataType?: ScoreDataType;
4421
- /** Reference a score config on a score. The unique langfuse identifier of a score config. When passing this field, the dataType and stringValue fields are automatically populated. */
4421
+ /** Reference a score config on a score. The unique elasticdash identifier of a score config. When passing this field, the dataType and stringValue fields are automatically populated. */
4422
4422
  configId?: string;
4423
4423
  }
4424
4424
 
@@ -5133,7 +5133,7 @@ declare class Comments {
5133
5133
  /**
5134
5134
  * Get a comment by id
5135
5135
  *
5136
- * @param {string} commentId - The unique langfuse identifier of a comment
5136
+ * @param {string} commentId - The unique elasticdash identifier of a comment
5137
5137
  * @param {Comments.RequestOptions} requestOptions - Request-specific configuration.
5138
5138
  *
5139
5139
  * @throws {@link LangfuseAPI.Error}
@@ -5624,7 +5624,7 @@ declare class Ingestion {
5624
5624
  /**
5625
5625
  * **Legacy endpoint for batch ingestion for Langfuse Observability.**
5626
5626
  *
5627
- * -> Please use the OpenTelemetry endpoint (`/api/public/otel/v1/traces`). Learn more: https://langfuse.com/integrations/native/opentelemetry
5627
+ * -> Please use the OpenTelemetry endpoint (`/api/public/otel/v1/traces`). Learn more: https://elasticdash.com/integrations/native/opentelemetry
5628
5628
  *
5629
5629
  * Within each batch, there can be multiple events.
5630
5630
  * Each event has a type, an id, a timestamp, metadata and a body.
@@ -5634,7 +5634,7 @@ declare class Ingestion {
5634
5634
  * I.e. if you want to update a trace, you'd use the same body id, but separate event IDs.
5635
5635
  *
5636
5636
  * Notes:
5637
- * - Introduction to data model: https://langfuse.com/docs/observability/data-model
5637
+ * - Introduction to data model: https://elasticdash.com/docs/observability/data-model
5638
5638
  * - Batch sizes are limited to 3.5 MB in total. You need to adjust the number of events per batch accordingly.
5639
5639
  * - The API does not return a 4xx status code for input errors. Instead, it responds with a 207 status code, which includes a list of the encountered errors.
5640
5640
  *
@@ -5840,7 +5840,7 @@ declare class Media {
5840
5840
  /**
5841
5841
  * Get a media record
5842
5842
  *
5843
- * @param {string} mediaId - The unique langfuse identifier of a media record
5843
+ * @param {string} mediaId - The unique elasticdash identifier of a media record
5844
5844
  * @param {Media.RequestOptions} requestOptions - Request-specific configuration.
5845
5845
  *
5846
5846
  * @throws {@link LangfuseAPI.Error}
@@ -5857,7 +5857,7 @@ declare class Media {
5857
5857
  /**
5858
5858
  * Patch a media record
5859
5859
  *
5860
- * @param {string} mediaId - The unique langfuse identifier of a media record
5860
+ * @param {string} mediaId - The unique elasticdash identifier of a media record
5861
5861
  * @param {LangfuseAPI.PatchMediaBody} request
5862
5862
  * @param {Media.RequestOptions} requestOptions - Request-specific configuration.
5863
5863
  *
@@ -5955,7 +5955,7 @@ declare class MetricsV2 {
5955
5955
  * - Backwards-compatible: traceName, traceRelease, traceVersion dimensions are still available on observations view
5956
5956
  * - High cardinality dimensions are not supported and will return a 400 error (see below)
5957
5957
  *
5958
- * For more details, see the [Metrics API documentation](https://langfuse.com/docs/metrics/features/metrics-api).
5958
+ * For more details, see the [Metrics API documentation](https://elasticdash.com/docs/metrics/features/metrics-api).
5959
5959
  *
5960
5960
  * ## Available Views
5961
5961
  *
@@ -6115,7 +6115,7 @@ declare class Metrics {
6115
6115
  *
6116
6116
  * Consider using the [v2 metrics endpoint](/api-reference#tag/metricsv2/GET/api/public/v2/metrics) for better performance.
6117
6117
  *
6118
- * For more details, see the [Metrics API documentation](https://langfuse.com/docs/metrics/features/metrics-api).
6118
+ * For more details, see the [Metrics API documentation](https://elasticdash.com/docs/metrics/features/metrics-api).
6119
6119
  *
6120
6120
  * @param {LangfuseAPI.GetMetricsRequest} request
6121
6121
  * @param {Metrics.RequestOptions} requestOptions - Request-specific configuration.
@@ -6390,7 +6390,7 @@ declare class Observations {
6390
6390
  /**
6391
6391
  * Get a observation
6392
6392
  *
6393
- * @param {string} observationId - The unique langfuse identifier of an observation, can be an event, span or generation
6393
+ * @param {string} observationId - The unique elasticdash identifier of an observation, can be an event, span or generation
6394
6394
  * @param {Observations.RequestOptions} requestOptions - Request-specific configuration.
6395
6395
  *
6396
6396
  * @throws {@link LangfuseAPI.Error}
@@ -6483,8 +6483,8 @@ declare class Opentelemetry {
6483
6483
  * - Implements `ExportTraceServiceRequest` message format
6484
6484
  *
6485
6485
  * **Documentation:**
6486
- * - Integration guide: https://langfuse.com/integrations/native/opentelemetry
6487
- * - Data model: https://langfuse.com/docs/observability/data-model
6486
+ * - Integration guide: https://elasticdash.com/integrations/native/opentelemetry
6487
+ * - Data model: https://elasticdash.com/docs/observability/data-model
6488
6488
  *
6489
6489
  * @param {LangfuseAPI.OtelTraceRequest} request
6490
6490
  * @param {Opentelemetry.RequestOptions} requestOptions - Request-specific configuration.
@@ -6513,7 +6513,7 @@ declare class Opentelemetry {
6513
6513
  * },
6514
6514
  * scopeSpans: [{
6515
6515
  * scope: {
6516
- * name: "langfuse-sdk",
6516
+ * name: "elasticdash-sdk",
6517
6517
  * version: "2.60.3"
6518
6518
  * },
6519
6519
  * spans: [{
@@ -6524,7 +6524,7 @@ declare class Opentelemetry {
6524
6524
  * startTimeUnixNano: "1747872000000000000",
6525
6525
  * endTimeUnixNano: "1747872001000000000",
6526
6526
  * attributes: [{
6527
- * key: "langfuse.observation.type",
6527
+ * key: "elasticdash.observation.type",
6528
6528
  * value: {
6529
6529
  * stringValue: "generation"
6530
6530
  * }
@@ -7362,7 +7362,7 @@ declare class ScoreConfigs {
7362
7362
  /**
7363
7363
  * Get a score config
7364
7364
  *
7365
- * @param {string} configId - The unique langfuse identifier of a score config
7365
+ * @param {string} configId - The unique elasticdash identifier of a score config
7366
7366
  * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.
7367
7367
  *
7368
7368
  * @throws {@link LangfuseAPI.Error}
@@ -7379,7 +7379,7 @@ declare class ScoreConfigs {
7379
7379
  /**
7380
7380
  * Update a score config
7381
7381
  *
7382
- * @param {string} configId - The unique langfuse identifier of a score config
7382
+ * @param {string} configId - The unique elasticdash identifier of a score config
7383
7383
  * @param {LangfuseAPI.UpdateScoreConfigRequest} request
7384
7384
  * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.
7385
7385
  *
@@ -7466,7 +7466,7 @@ declare class ScoreV2 {
7466
7466
  /**
7467
7467
  * Get a score (supports both trace and session scores)
7468
7468
  *
7469
- * @param {string} scoreId - The unique langfuse identifier of a score
7469
+ * @param {string} scoreId - The unique elasticdash identifier of a score
7470
7470
  * @param {ScoreV2.RequestOptions} requestOptions - Request-specific configuration.
7471
7471
  *
7472
7472
  * @throws {@link LangfuseAPI.Error}
@@ -7559,7 +7559,7 @@ declare class Score {
7559
7559
  /**
7560
7560
  * Delete a score (supports both trace and session scores)
7561
7561
  *
7562
- * @param {string} scoreId - The unique langfuse identifier of a score
7562
+ * @param {string} scoreId - The unique elasticdash identifier of a score
7563
7563
  * @param {Score.RequestOptions} requestOptions - Request-specific configuration.
7564
7564
  *
7565
7565
  * @throws {@link LangfuseAPI.Error}
@@ -7700,7 +7700,7 @@ declare class Trace {
7700
7700
  /**
7701
7701
  * Get a specific trace
7702
7702
  *
7703
- * @param {string} traceId - The unique langfuse identifier of a trace
7703
+ * @param {string} traceId - The unique elasticdash identifier of a trace
7704
7704
  * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
7705
7705
  *
7706
7706
  * @throws {@link LangfuseAPI.Error}
@@ -7717,7 +7717,7 @@ declare class Trace {
7717
7717
  /**
7718
7718
  * Delete a specific trace
7719
7719
  *
7720
- * @param {string} traceId - The unique langfuse identifier of the trace to delete
7720
+ * @param {string} traceId - The unique elasticdash identifier of the trace to delete
7721
7721
  * @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
7722
7722
  *
7723
7723
  * @throws {@link LangfuseAPI.Error}