Skip to content

Commit

Permalink
Add warning in modules doc (#1581)
Browse files Browse the repository at this point in the history
Co-authored-by: Clayton Cornell <[email protected]>
  • Loading branch information
wildum and clayton-cornell authored Aug 29, 2024
1 parent 65c0909 commit dcd3f51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/sources/get-started/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ For example, if a configuration contains a block called `import.file "my_module"

If an import namespace matches the name of a built-in component namespace, such as `prometheus`, the built-in namespace is hidden from the importing module, and only components defined in the imported module may be used.

{{< admonition type="warning" >}}
If you choose a label that corresponds to an existing component for an `import` or a `declare` block, the component will be shadowed and you won't be able to use it in your configuration.
For example, if you use the label `import.file "mimir"`, you won't be able to use the existing components that start with `mimir` such as `mimir.rules.kubernetes` because it refers to the module imported via the `import` block.
{{< /admonition >}}

## Example

This example module defines a component to filter out debug-level and info-level log lines:
Expand Down

0 comments on commit dcd3f51

Please sign in to comment.