elastic / elastic/ecs-logging-python

how to prefix structlog log value with "custom." or route them to a certain ecs field

Abierto
#52 3 comentarios 0 reacciones 0 asignados Ver en GitHub
agent-python
Lenguaje dominante
Python
Estrellas
74
Forks
33
Merge medio
9 h 3 min
PR fusionados (30 d)
1

Descripción

Hi,
according to the ecs documentation non ecs standard fields should go under "custom."
Also I might log data that should go to a certain ecs field

but i'm not sure how to configure something like this in structlog/ecs-logging.

for example this:
```python
req_id = uuid()
...
logger.info("something happend", foo="123", request_id=req_id)

```
should end up being something like this:
```json
{
"http.request.id" : "",
"message": "something happend",
"custom.foo" : 123
...
}
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.