lab6: observability — OTel Collector, Prometheus, Loki, Tempo, Grafana
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
"""add traceparent tracestate to jobs
|
||||
|
||||
Revision ID: 2667e1880881
|
||||
Revises: 390b34423ded
|
||||
Create Date: 2026-11-10 13:31:26.245215
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision: str = '2667e1880881'
|
||||
down_revision: Union[str, None] = '390b34423ded'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.execute("""
|
||||
ALTER TABLE jobs
|
||||
ADD COLUMN IF NOT EXISTS traceparent TEXT
|
||||
""")
|
||||
op.execute("""
|
||||
ALTER TABLE jobs
|
||||
ADD COLUMN IF NOT EXISTS tracestate TEXT
|
||||
""")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.execute("ALTER TABLE jobs DROP COLUMN IF EXISTS tracestate")
|
||||
op.execute("ALTER TABLE jobs DROP COLUMN IF EXISTS traceparent")
|
||||
Reference in New Issue
Block a user