@effect/opentelemetry
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -10,5 +10,15 @@ /** | ||
* @since 1.0.0 | ||
* @category model | ||
*/ | ||
export type Configuration = Partial<Omit<NodeSDKConfiguration, "resource" | "serviceName">>; | ||
/** | ||
* @since 1.0.0 | ||
* @category constructor | ||
*/ | ||
export declare const config: (config: Configuration) => Configuration; | ||
/** | ||
* @since 1.0.0 | ||
* @category layer | ||
*/ | ||
export declare const layer: <R, E>(config: Effect.Effect<R, E, Partial<Omit<NodeSDKConfiguration, "resource" | "serviceName">>>) => Layer.Layer<Resource | Exclude<R, import("@effect/io/Scope").Scope>, E, never>; | ||
export declare const layer: <R, E>(config: Effect.Effect<R, E, Partial<Omit<NodeSDKConfiguration, "resource" | "serviceName">>>) => Layer.Layer<Resource | R, E, never>; | ||
//# sourceMappingURL=NodeSdk.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.layer = void 0; | ||
exports.layer = exports.config = void 0; | ||
var Effect = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Effect")); | ||
@@ -20,4 +20,10 @@ var Layer = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Layer")); | ||
* @since 1.0.0 | ||
* @category constructor | ||
*/ | ||
const config = config => config; | ||
/** | ||
* @since 1.0.0 | ||
* @category layer | ||
*/ | ||
exports.config = config; | ||
const layer = config => Layer.scopedDiscard(Effect.acquireRelease(Effect.flatMap(Effect.all(config, _Resource.Resource), ([config, resource]) => Effect.sync(() => { | ||
@@ -24,0 +30,0 @@ const sdk = new _sdkNode.NodeSDK({ |
{ | ||
"name": "@effect/opentelemetry", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -12,7 +12,19 @@ /** | ||
* @since 1.0.0 | ||
* @category model | ||
*/ | ||
export type Configuration = Partial<Omit<NodeSDKConfiguration, "resource" | "serviceName">> | ||
/** | ||
* @since 1.0.0 | ||
* @category constructor | ||
*/ | ||
export const config: (config: Configuration) => Configuration = (config: Configuration) => config | ||
/** | ||
* @since 1.0.0 | ||
* @category layer | ||
*/ | ||
export const layer = <R, E>( | ||
config: Effect.Effect<R, E, Partial<Omit<NodeSDKConfiguration, "resource" | "serviceName">>> | ||
) => | ||
config: Effect.Effect<R, E, Configuration> | ||
): Layer.Layer<Resource | R, E, never> => | ||
Layer.scopedDiscard(Effect.acquireRelease( | ||
@@ -19,0 +31,0 @@ Effect.flatMap( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
44960
704