Files
medusa-store/www/apps/resources/references/modules/medusa/page.mdx
github-actions[bot] 41f070be9a chore(docs): Generated References (automated) (#11579)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2025-02-24 13:47:40 +02:00

102 lines
5.1 KiB
Plaintext

import { TypeList } from "docs-ui"
# medusa
## Classes
- [RestrictedFields](../../medusa/classes/medusa.RestrictedFields/page.mdx)
## Functions
- [instrumentHttpLayer](page.mdx#instrumenthttplayer)
- [instrumentRemoteQuery](page.mdx#instrumentremotequery)
- [instrumentWorkflows](page.mdx#instrumentworkflows)
- [registerOtel](page.mdx#registerotel)
## Interfaces
- [FindConfig](../../medusa/interfaces/medusa.FindConfig/page.mdx)
- [Logger](../../medusa/interfaces/medusa.Logger/page.mdx)
- [MedusaRequest](../../medusa/interfaces/medusa.MedusaRequest/page.mdx)
- [RequestQueryFields](../../medusa/interfaces/medusa.RequestQueryFields/page.mdx)
- [SubscriberContext](../../medusa/interfaces/medusa.SubscriberContext/page.mdx)
## Type Aliases
- [ClassConstructor](../../medusa/types/medusa.ClassConstructor/page.mdx)
- [Constructor](../../medusa/types/medusa.Constructor/page.mdx)
- [Event](../../medusa/types/medusa.Event/page.mdx)
- [EventMetadata](../../medusa/types/medusa.EventMetadata/page.mdx)
- [FindConfigOrder](../../medusa/types/medusa.FindConfigOrder/page.mdx)
- [Logger](../../medusa/types/medusa.Logger/page.mdx)
- [MedusaContainer](../../medusa/types/medusa.MedusaContainer/page.mdx)
- [MedusaContainer](../../medusa/types/medusa.MedusaContainer/page.mdx)
- [MedusaContainer](../../medusa/types/medusa.MedusaContainer/page.mdx)
- [MedusaErrorHandlerFunction](../../medusa/types/medusa.MedusaErrorHandlerFunction/page.mdx)
- [MedusaNextFunction](../../medusa/types/medusa.MedusaNextFunction/page.mdx)
- [MedusaPricingContext](../../medusa/types/medusa.MedusaPricingContext/page.mdx)
- [MedusaRequestHandler](../../medusa/types/medusa.MedusaRequestHandler/page.mdx)
- [MedusaResponse](../../medusa/types/medusa.MedusaResponse/page.mdx)
- [MiddlewareFunction](../../medusa/types/medusa.MiddlewareFunction/page.mdx)
- [MiddlewareRoute](../../medusa/types/medusa.MiddlewareRoute/page.mdx)
- [MiddlewaresConfig](../../medusa/types/medusa.MiddlewaresConfig/page.mdx)
- [MiddlewareVerb](../../medusa/types/medusa.MiddlewareVerb/page.mdx)
- [ParserConfig](../../medusa/types/medusa.ParserConfig/page.mdx)
- [ParserConfigArgs](../../medusa/types/medusa.ParserConfigArgs/page.mdx)
- [RouteVerb](../../medusa/types/medusa.RouteVerb/page.mdx)
- [SubscriberArgs](../../medusa/types/medusa.SubscriberArgs/page.mdx)
- [SubscriberConfig](../../medusa/types/medusa.SubscriberConfig/page.mdx)
## Variables
- [HTTP\_METHODS](page.mdx#http_methods)
___
## Functions
### instrumentHttpLayer
Instrument the first touch point of the HTTP layer to report traces to
OpenTelemetry
### instrumentRemoteQuery
Instrument the queries made using the remote query
### instrumentWorkflows
Instrument the workflows and steps execution
### registerOtel
A helper function to configure the OpenTelemetry SDK with some defaults.
For better/more control, please configure the SDK manually.
You will have to install the following packages within your app for
telemetry to work
- @opentelemetry/sdk-node
- @opentelemetry/resources
- @opentelemetry/sdk-trace-node
- @opentelemetry/instrumentation-pg
- @opentelemetry/instrumentation
#### Parameters
<TypeList types={[{"name":"options","type":"Partial&#60;NodeSDKConfiguration&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"exporter","type":"`SpanExporter`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"instrument","type":"Partial&#60;object&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"http","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"workflows","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"db","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="registerOtel"/>
#### Returns
<TypeList types={[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"A helper function to configure the OpenTelemetry SDK with some defaults.\nFor better/more control, please configure the SDK manually.\n\nYou will have to install the following packages within your app for\ntelemetry to work\n\n- @opentelemetry/sdk-node\n- @opentelemetry/resources\n- @opentelemetry/sdk-trace-node\n- @opentelemetry/instrumentation-pg\n- @opentelemetry/instrumentation","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="registerOtel"/>
___
## Variables
### HTTP\_METHODS
`Const` **HTTP\_METHODS**: readonly [`"GET"`, `"POST"`, `"PUT"`, `"PATCH"`, `"DELETE"`, `"OPTIONS"`, `"HEAD"`]
List of all the supported HTTP methods