diff --git a/golang/frontend/main.go b/golang/frontend/main.go index cf2f577b..b0313c9b 100644 --- a/golang/frontend/main.go +++ b/golang/frontend/main.go @@ -18,17 +18,19 @@ import ( "github.com/honeycombio/opentelemetry-exporter-go/honeycomb" ) -const ( - nameServiceUrl = "http://localhost:8000/name" - messageServiceUrl = "http://localhost:9000/message" +var ( + apiKey = os.Getenv("HONEYCOMB_API_KEY") + dataset = os.Getenv("HONEYCOMB_DATASET") + nameServiceUrl = os.Getenv("NAME_ENDPOINT") + "/name" + messageServiceUrl = os.Getenv("MESSAGE_ENDPOINT") + "/message" ) func main() { exp, err := honeycomb.NewExporter( honeycomb.Config{ - APIKey: os.Getenv("HONEYCOMB_API_KEY"), + APIKey: apiKey, }, - honeycomb.TargetingDataset(os.Getenv("HONEYCOMB_DATASET")), + honeycomb.TargetingDataset(dataset), honeycomb.WithServiceName("frontend-go"), ) if err != nil { diff --git a/golang/name-service/main.go b/golang/name-service/main.go index a8d929ac..f2481437 100644 --- a/golang/name-service/main.go +++ b/golang/name-service/main.go @@ -19,10 +19,16 @@ import ( "go.opentelemetry.io/otel/instrumentation/httptrace" ) +var ( + apiKey = os.Getenv("HONEYCOMB_API_KEY") + dataset = os.Getenv("HONEYCOMB_DATASET") + yearServiceUrl = os.Getenv("YEAR_ENDPOINT") + "/year" +) + func main() { beeline.Init(beeline.Config{ - WriteKey: os.Getenv("HONEYCOMB_API_KEY"), - Dataset: os.Getenv("HONEYCOMB_DATASET"), + WriteKey: apiKey, + Dataset: dataset, ServiceName: "name-go", }) defer beeline.Close() @@ -72,7 +78,7 @@ func propagateTraceHook(r *http.Request, prop *propagation.PropagationContext) m func getYear(ctx context.Context) (int, context.Context) { ctx, span := beeline.StartSpan(ctx, "✨ call /year ✨") defer span.Send() - req, _ := http.NewRequest("GET", "http://localhost:6001/year", nil) + req, _ := http.NewRequest("GET", yearServiceUrl, nil) ctx, req = httptrace.W3C(ctx, req) httptrace.Inject(ctx, req) client := &http.Client{ diff --git a/python/frontend/frontend/__init__.py b/python/frontend/frontend/__init__.py index 7ebc2ead..941c4b0a 100644 --- a/python/frontend/frontend/__init__.py +++ b/python/frontend/frontend/__init__.py @@ -1,5 +1,7 @@ __version__ = '0.1.0' +import os + from werkzeug.routing import Map, Rule from werkzeug.wrappers import Request, Response from http.client import HTTPException @@ -9,7 +11,8 @@ class Greeting(object): - + NAME_ENDPOINT = os.environ.get('NAME_ENDPOINT', 'http://localhost:8000') + '/name' + MESSAGE_ENDPOINT = os.environ.get('MESSAGE_ENDPOINT', 'http://localhost:9000') + '/message' def __init__(self): self.url_map = Map([ Rule('/greeting', endpoint='greeting'), @@ -29,11 +32,11 @@ def dispatch_request(self, request): return e def get_name(self): - with urllib.request.urlopen('http://localhost:8000/name') as f: + with urllib.request.urlopen(self.NAME_ENDPOINT) as f: return f.read().decode('utf-8') def get_message(self): - with urllib.request.urlopen('http://localhost:9000/message') as f: + with urllib.request.urlopen(self.MESSAGE_ENDPOINT) as f: return f.read().decode('utf-8') def wsgi_app(self, environ, start_response): diff --git a/python/frontend/frontend/__main__.py b/python/frontend/frontend/__main__.py index db97cfea..76e9dd0e 100644 --- a/python/frontend/frontend/__main__.py +++ b/python/frontend/frontend/__main__.py @@ -19,4 +19,4 @@ app = HoneyWSGIMiddleware(create_app()) -run_simple('127.0.0.1', 7000, app, use_debugger=True, use_reloader=True) +run_simple('0.0.0.0', 7000, app, use_debugger=True, use_reloader=True) diff --git a/python/message-service/message_service/__main__.py b/python/message-service/message_service/__main__.py index 46d233a2..bb7f75d0 100644 --- a/python/message-service/message_service/__main__.py +++ b/python/message-service/message_service/__main__.py @@ -34,4 +34,4 @@ def message(): app = HoneyWSGIMiddleware(app) -run(app=app, host='127.0.0.1', port=9000) +run(app=app, host='0.0.0.0', port=9000) diff --git a/python/name-service/name_service/__init__.py b/python/name-service/name_service/__init__.py index bc3302ec..69ac5426 100644 --- a/python/name-service/name_service/__init__.py +++ b/python/name-service/name_service/__init__.py @@ -19,10 +19,11 @@ 2020: ['olivia', 'noah', 'emma', 'liam', 'ava', 'elijah', 'isabella', 'oliver', 'sophia', 'lucas'] } +YEAR_ENDPOINT = os.environ.get('YEAR_ENDPOINT', 'http://localhost:6001') + '/year' @beeline.traced(name="✨ call /year ✨") def get_year(): - r = requests.get('http://localhost:6001/year') + r = requests.get(YEAR_ENDPOINT) return int(r.text) diff --git a/python/year-service/poetry.lock b/python/year-service/poetry.lock index 42fd2ced..28e4973e 100644 --- a/python/year-service/poetry.lock +++ b/python/year-service/poetry.lock @@ -1,190 +1,188 @@ [[package]] -category = "main" -description = "ASGI specs, helper code, and adapters" name = "asgiref" +version = "3.3.4" +description = "ASGI specs, helper code, and adapters" +category = "main" optional = false -python-versions = ">=3.5" -version = "3.2.10" +python-versions = ">=3.6" [package.extras] -tests = ["pytest", "pytest-asyncio"] +tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"] [[package]] -category = "dev" -description = "Atomic file writes." -marker = "sys_platform == \"win32\"" name = "atomicwrites" +version = "1.4.0" +description = "Atomic file writes." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.4.0" [[package]] -category = "dev" -description = "Classes Without Boilerplate" name = "attrs" +version = "21.2.0" +description = "Classes Without Boilerplate" +category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "20.1.0" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -dev = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "sphinx-rtd-theme", "pre-commit"] -docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"] -tests = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] +docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] [[package]] -category = "dev" -description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" name = "autopep8" +version = "1.5.7" +description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" +category = "dev" optional = false python-versions = "*" -version = "1.5.4" [package.dependencies] -pycodestyle = ">=2.6.0" +pycodestyle = ">=2.7.0" toml = "*" [[package]] -category = "main" -description = "Python package for providing Mozilla's CA Bundle." name = "certifi" +version = "2021.5.30" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" optional = false python-versions = "*" -version = "2020.6.20" [[package]] -category = "main" -description = "Universal encoding detector for Python 2 and 3" name = "chardet" +version = "4.0.0" +description = "Universal encoding detector for Python 2 and 3" +category = "main" optional = false -python-versions = "*" -version = "3.0.4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] -category = "dev" -description = "Cross-platform colored terminal text." -marker = "sys_platform == \"win32\"" name = "colorama" +version = "0.4.4" +description = "Cross-platform colored terminal text." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.4.3" [[package]] -category = "main" -description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design." name = "django" +version = "3.2.4" +description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design." +category = "main" optional = false python-versions = ">=3.6" -version = "3.1" [package.dependencies] -asgiref = ">=3.2.10,<3.3.0" +asgiref = ">=3.3.2,<4" pytz = "*" sqlparse = ">=0.2.2" [package.extras] -argon2 = ["argon2-cffi (>=16.1.0)"] +argon2 = ["argon2-cffi (>=19.1.0)"] bcrypt = ["bcrypt"] [[package]] -category = "main" -description = "Honeycomb library for easy instrumentation" name = "honeycomb-beeline" +version = "2.17.0" +description = "Honeycomb library for easy instrumentation" +category = "main" optional = false python-versions = ">=2.7" -version = "2.12.2" [package.dependencies] libhoney = ">=1.7.0" wrapt = ">=1.12.1,<2.0.0" [[package]] -category = "main" -description = "Internationalized Domain Names in Applications (IDNA)" name = "idna" +version = "2.10" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.10" [[package]] -category = "main" -description = "Python library for sending data to Honeycomb" name = "libhoney" +version = "1.10.0" +description = "Python library for sending data to Honeycomb" +category = "main" optional = false -python-versions = "*" -version = "1.9.0" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -requests = "*" -six = "*" -statsd = "*" +requests = ">=2.24.0,<3.0.0" +six = ">=1.15.0,<2.0.0" +statsd = ">=3.3.0,<4.0.0" [[package]] -category = "dev" -description = "More routines for operating on iterables, beyond itertools" name = "more-itertools" +version = "8.8.0" +description = "More routines for operating on iterables, beyond itertools" +category = "dev" optional = false python-versions = ">=3.5" -version = "8.4.0" [[package]] -category = "dev" -description = "Core utilities for Python packages" name = "packaging" +version = "20.9" +description = "Core utilities for Python packages" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "20.4" [package.dependencies] pyparsing = ">=2.0.2" -six = "*" [[package]] -category = "dev" -description = "plugin and hook calling mechanisms for python" name = "pluggy" +version = "0.13.1" +description = "plugin and hook calling mechanisms for python" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.13.1" [package.extras] dev = ["pre-commit", "tox"] [[package]] -category = "dev" -description = "library with cross-python path, ini-parsing, io, code, log facilities" name = "py" +version = "1.10.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.9.0" [[package]] -category = "dev" -description = "Python style guide checker" name = "pycodestyle" +version = "2.7.0" +description = "Python style guide checker" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.6.0" [[package]] -category = "dev" -description = "Python parsing module" name = "pyparsing" +version = "2.4.7" +description = "Python parsing module" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -version = "2.4.7" [[package]] -category = "dev" -description = "pytest: simple powerful testing with Python" name = "pytest" +version = "5.4.3" +description = "pytest: simple powerful testing with Python" +category = "dev" optional = false python-versions = ">=3.5" -version = "5.4.3" [package.dependencies] -atomicwrites = ">=1.0" +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=17.4.0" -colorama = "*" +colorama = {version = "*", markers = "sys_platform == \"win32\""} more-itertools = ">=4.0.0" packaging = "*" pluggy = ">=0.12,<1.0" @@ -192,174 +190,176 @@ py = ">=1.5.0" wcwidth = "*" [package.extras] -checkqa-mypy = ["mypy (v0.761)"] +checkqa-mypy = ["mypy (==v0.761)"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] -category = "main" -description = "Add .env support to your django/flask apps in development and deployments" name = "python-dotenv" +version = "0.14.0" +description = "Add .env support to your django/flask apps in development and deployments" +category = "main" optional = false python-versions = "*" -version = "0.14.0" [package.extras] cli = ["click (>=5.0)"] [[package]] -category = "main" -description = "World timezone definitions, modern and historical" name = "pytz" +version = "2021.1" +description = "World timezone definitions, modern and historical" +category = "main" optional = false python-versions = "*" -version = "2020.1" [[package]] -category = "main" -description = "Python HTTP for Humans." name = "requests" +version = "2.25.1" +description = "Python HTTP for Humans." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.24.0" [package.dependencies] certifi = ">=2017.4.17" -chardet = ">=3.0.2,<4" +chardet = ">=3.0.2,<5" idna = ">=2.5,<3" -urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" +urllib3 = ">=1.21.1,<1.27" [package.extras] security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] +socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] [[package]] -category = "main" -description = "Python 2 and 3 compatibility utilities" name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -version = "1.15.0" [[package]] -category = "main" -description = "Non-validating SQL parser" name = "sqlparse" +version = "0.4.1" +description = "A non-validating SQL parser." +category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.3.1" +python-versions = ">=3.5" [[package]] -category = "main" -description = "A simple statsd client." name = "statsd" +version = "3.3.0" +description = "A simple statsd client." +category = "main" optional = false python-versions = "*" -version = "3.3.0" [[package]] -category = "dev" -description = "Python Library for Tom's Obvious, Minimal Language" name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" optional = false -python-versions = "*" -version = "0.10.1" +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] -category = "main" -description = "HTTP library with thread-safe connection pooling, file post, and more." name = "urllib3" +version = "1.26.5" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" -version = "1.25.10" [package.extras] brotli = ["brotlipy (>=0.6.0)"] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] -category = "dev" -description = "Measures the displayed width of unicode strings in a terminal" name = "wcwidth" +version = "0.2.5" +description = "Measures the displayed width of unicode strings in a terminal" +category = "dev" optional = false python-versions = "*" -version = "0.2.5" [[package]] -category = "main" -description = "Module for decorators, wrappers and monkey patching." name = "wrapt" +version = "1.12.1" +description = "Module for decorators, wrappers and monkey patching." +category = "main" optional = false python-versions = "*" -version = "1.12.1" [metadata] -content-hash = "fba171605245638e068c9044445fcb54e003490aef5da07fc8862943dd73abb9" -lock-version = "1.0" +lock-version = "1.1" python-versions = "^3.8" +content-hash = "fba171605245638e068c9044445fcb54e003490aef5da07fc8862943dd73abb9" [metadata.files] asgiref = [ - {file = "asgiref-3.2.10-py3-none-any.whl", hash = "sha256:9fc6fb5d39b8af147ba40765234fa822b39818b12cc80b35ad9b0cef3a476aed"}, - {file = "asgiref-3.2.10.tar.gz", hash = "sha256:7e51911ee147dd685c3c8b805c0ad0cb58d360987b56953878f8c06d2d1c6f1a"}, + {file = "asgiref-3.3.4-py3-none-any.whl", hash = "sha256:92906c611ce6c967347bbfea733f13d6313901d54dcca88195eaeb52b2a8e8ee"}, + {file = "asgiref-3.3.4.tar.gz", hash = "sha256:d1216dfbdfb63826470995d31caed36225dcaf34f182e0fa257a4dd9e86f1b78"}, ] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, ] attrs = [ - {file = "attrs-20.1.0-py2.py3-none-any.whl", hash = "sha256:2867b7b9f8326499ab5b0e2d12801fa5c98842d2cbd22b35112ae04bf85b4dff"}, - {file = "attrs-20.1.0.tar.gz", hash = "sha256:0ef97238856430dcf9228e07f316aefc17e8939fc8507e18c6501b761ef1a42a"}, + {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, + {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, ] autopep8 = [ - {file = "autopep8-1.5.4.tar.gz", hash = "sha256:d21d3901cb0da6ebd1e83fc9b0dfbde8b46afc2ede4fe32fbda0c7c6118ca094"}, + {file = "autopep8-1.5.7-py2.py3-none-any.whl", hash = "sha256:aa213493c30dcdac99537249ee65b24af0b2c29f2e83cd8b3f68760441ed0db9"}, + {file = "autopep8-1.5.7.tar.gz", hash = "sha256:276ced7e9e3cb22e5d7c14748384a5cf5d9002257c0ed50c0e075b68011bb6d0"}, ] certifi = [ - {file = "certifi-2020.6.20-py2.py3-none-any.whl", hash = "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41"}, - {file = "certifi-2020.6.20.tar.gz", hash = "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3"}, + {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"}, + {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, ] chardet = [ - {file = "chardet-3.0.4-py2.py3-none-any.whl", hash = "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"}, - {file = "chardet-3.0.4.tar.gz", hash = "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"}, + {file = "chardet-4.0.0-py2.py3-none-any.whl", hash = "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"}, + {file = "chardet-4.0.0.tar.gz", hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"}, ] colorama = [ - {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, - {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, + {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, + {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] django = [ - {file = "Django-3.1-py3-none-any.whl", hash = "sha256:1a63f5bb6ff4d7c42f62a519edc2adbb37f9b78068a5a862beff858b68e3dc8b"}, - {file = "Django-3.1.tar.gz", hash = "sha256:2d390268a13c655c97e0e2ede9d117007996db692c1bb93eabebd4fb7ea7012b"}, + {file = "Django-3.2.4-py3-none-any.whl", hash = "sha256:ea735cbbbb3b2fba6d4da4784a0043d84c67c92f1fdf15ad6db69900e792c10f"}, + {file = "Django-3.2.4.tar.gz", hash = "sha256:66c9d8db8cc6fe938a28b7887c1596e42d522e27618562517cc8929eb7e7f296"}, ] honeycomb-beeline = [ - {file = "honeycomb-beeline-2.12.2.tar.gz", hash = "sha256:57a1fb98eccd209c64b333d12ae18cbe5b2e2f673b984f9917523b92e110599a"}, - {file = "honeycomb_beeline-2.12.2-py2.py3-none-any.whl", hash = "sha256:64777cadfbe20bbd5a17ef6c581a81d6f30179eec2884f0e29ef2d504e41b9ab"}, + {file = "honeycomb-beeline-2.17.0.tar.gz", hash = "sha256:9287f69afdf22998fdb1636376b3e5bb271e137d61b8ffaec1e2b6c1b2e8d690"}, + {file = "honeycomb_beeline-2.17.0-py2.py3-none-any.whl", hash = "sha256:3078b701b2f43b1997d0fcf0016ffc6740643bcf1e6f36605f5c7e1f9efa25d9"}, ] idna = [ {file = "idna-2.10-py2.py3-none-any.whl", hash = "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"}, {file = "idna-2.10.tar.gz", hash = "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"}, ] libhoney = [ - {file = "libhoney-1.9.0.tar.gz", hash = "sha256:b70010f9c37fed4e27708a1b16f1dc6de9486dd21c9a986b3764f84b3c944fee"}, + {file = "libhoney-1.10.0-py2.py3-none-any.whl", hash = "sha256:a7ea3783b9ca011174b1c657887c56c9055028861bc59c5137abd0a4bf22e3d0"}, + {file = "libhoney-1.10.0.tar.gz", hash = "sha256:4322c4e3a08f3304843f52ce8b19372569cf294db13d86d2fa7b466fcd90c979"}, ] more-itertools = [ - {file = "more-itertools-8.4.0.tar.gz", hash = "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5"}, - {file = "more_itertools-8.4.0-py3-none-any.whl", hash = "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2"}, + {file = "more-itertools-8.8.0.tar.gz", hash = "sha256:83f0308e05477c68f56ea3a888172c78ed5d5b3c282addb67508e7ba6c8f813a"}, + {file = "more_itertools-8.8.0-py3-none-any.whl", hash = "sha256:2cf89ec599962f2ddc4d568a05defc40e0a587fbc10d5989713638864c36be4d"}, ] packaging = [ - {file = "packaging-20.4-py2.py3-none-any.whl", hash = "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181"}, - {file = "packaging-20.4.tar.gz", hash = "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8"}, + {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, + {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, ] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] py = [ - {file = "py-1.9.0-py2.py3-none-any.whl", hash = "sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2"}, - {file = "py-1.9.0.tar.gz", hash = "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342"}, + {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, + {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, ] pycodestyle = [ - {file = "pycodestyle-2.6.0-py2.py3-none-any.whl", hash = "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367"}, - {file = "pycodestyle-2.6.0.tar.gz", hash = "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e"}, + {file = "pycodestyle-2.7.0-py2.py3-none-any.whl", hash = "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068"}, + {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, ] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, @@ -374,32 +374,32 @@ python-dotenv = [ {file = "python_dotenv-0.14.0-py2.py3-none-any.whl", hash = "sha256:c10863aee750ad720f4f43436565e4c1698798d763b63234fb5021b6c616e423"}, ] pytz = [ - {file = "pytz-2020.1-py2.py3-none-any.whl", hash = "sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed"}, - {file = "pytz-2020.1.tar.gz", hash = "sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048"}, + {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, + {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, ] requests = [ - {file = "requests-2.24.0-py2.py3-none-any.whl", hash = "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898"}, - {file = "requests-2.24.0.tar.gz", hash = "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b"}, + {file = "requests-2.25.1-py2.py3-none-any.whl", hash = "sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e"}, + {file = "requests-2.25.1.tar.gz", hash = "sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804"}, ] six = [ - {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, - {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] sqlparse = [ - {file = "sqlparse-0.3.1-py2.py3-none-any.whl", hash = "sha256:022fb9c87b524d1f7862b3037e541f68597a730a8843245c349fc93e1643dc4e"}, - {file = "sqlparse-0.3.1.tar.gz", hash = "sha256:e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548"}, + {file = "sqlparse-0.4.1-py3-none-any.whl", hash = "sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0"}, + {file = "sqlparse-0.4.1.tar.gz", hash = "sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8"}, ] statsd = [ {file = "statsd-3.3.0-py2.py3-none-any.whl", hash = "sha256:c610fb80347fca0ef62666d241bce64184bd7cc1efe582f9690e045c25535eaa"}, {file = "statsd-3.3.0.tar.gz", hash = "sha256:e3e6db4c246f7c59003e51c9720a51a7f39a396541cb9b147ff4b14d15b5dd1f"}, ] toml = [ - {file = "toml-0.10.1-py2.py3-none-any.whl", hash = "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88"}, - {file = "toml-0.10.1.tar.gz", hash = "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f"}, + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] urllib3 = [ - {file = "urllib3-1.25.10-py2.py3-none-any.whl", hash = "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461"}, - {file = "urllib3-1.25.10.tar.gz", hash = "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a"}, + {file = "urllib3-1.26.5-py2.py3-none-any.whl", hash = "sha256:753a0374df26658f99d826cfe40394a686d05985786d946fbe4165b5148f5a7c"}, + {file = "urllib3-1.26.5.tar.gz", hash = "sha256:a7acd0977125325f516bda9735fa7142b909a8d01e8b2e4c8108d0984e6e0098"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, diff --git a/python/year-service/yearservice/yearapp/apps.py b/python/year-service/yearservice/yearapp/apps.py index ced08e72..d974b50e 100644 --- a/python/year-service/yearservice/yearapp/apps.py +++ b/python/year-service/yearservice/yearapp/apps.py @@ -1,7 +1,10 @@ -from django.apps import AppConfig import os import logging import beeline +import beeline.propagation.w3c as w3c + +from django.apps import AppConfig + class YearappConfig(AppConfig): @@ -13,6 +16,8 @@ def ready(self): beeline.init( writekey=os.environ.get("HONEYCOMB_API_KEY"), dataset=os.environ.get("HONEYCOMB_DATASET"), - service_name='year-service-python', + service_name='year-python', debug=True, + http_trace_parser_hook=w3c.http_trace_parser_hook, + http_trace_propagation_hook=w3c.http_trace_propagation_hook, ) diff --git a/python/year-service/yearservice/yearservice/settings.py b/python/year-service/yearservice/yearservice/settings.py index a3ed7cc3..0609a7b5 100644 --- a/python/year-service/yearservice/yearservice/settings.py +++ b/python/year-service/yearservice/yearservice/settings.py @@ -25,7 +25,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'year'] # Application definition diff --git a/ruby/frontend/Dockerfile b/ruby/frontend/Dockerfile index 0e588838..b5083a16 100644 --- a/ruby/frontend/Dockerfile +++ b/ruby/frontend/Dockerfile @@ -6,4 +6,4 @@ RUN bundle install COPY frontend.ru /myapp EXPOSE 7000 -CMD [ "rackup", "frontend.ru", "--server", "puma", "--host", "0.0.0.0"] +CMD [ "bundle", "exec", "rackup", "frontend.ru", "--server", "puma", "--host", "0.0.0.0"] diff --git a/ruby/frontend/Gemfile b/ruby/frontend/Gemfile index b40abe31..e1783042 100644 --- a/ruby/frontend/Gemfile +++ b/ruby/frontend/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' gem 'rails' gem 'puma' -gem 'opentelemetry-sdk' +gem 'opentelemetry-sdk', '~> 1.0.0.rc2' gem 'opentelemetry-exporter-otlp' gem 'opentelemetry-instrumentation-all' gem 'faraday' diff --git a/ruby/frontend/Gemfile.lock b/ruby/frontend/Gemfile.lock index 3c71b3bc..494e92cc 100644 --- a/ruby/frontend/Gemfile.lock +++ b/ruby/frontend/Gemfile.lock @@ -1,242 +1,263 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) + actioncable (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.3.1) - actionpack (= 6.1.3.1) - activejob (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionmailbox (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) mail (>= 2.7.1) - actionmailer (6.1.3.1) - actionpack (= 6.1.3.1) - actionview (= 6.1.3.1) - activejob (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionmailer (6.1.4) + actionpack (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activesupport (= 6.1.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.3.1) - actionview (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionpack (6.1.4) + actionview (= 6.1.4) + activesupport (= 6.1.4) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.3.1) - actionpack (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + actiontext (6.1.4) + actionpack (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) nokogiri (>= 1.8.5) - actionview (6.1.3.1) - activesupport (= 6.1.3.1) + actionview (6.1.4) + activesupport (= 6.1.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.3.1) - activesupport (= 6.1.3.1) + activejob (6.1.4) + activesupport (= 6.1.4) globalid (>= 0.3.6) - activemodel (6.1.3.1) - activesupport (= 6.1.3.1) - activerecord (6.1.3.1) - activemodel (= 6.1.3.1) - activesupport (= 6.1.3.1) - activestorage (6.1.3.1) - actionpack (= 6.1.3.1) - activejob (= 6.1.3.1) - activerecord (= 6.1.3.1) - activesupport (= 6.1.3.1) + activemodel (6.1.4) + activesupport (= 6.1.4) + activerecord (6.1.4) + activemodel (= 6.1.4) + activesupport (= 6.1.4) + activestorage (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activesupport (= 6.1.4) marcel (~> 1.0.0) - mini_mime (~> 1.0.2) - activesupport (6.1.3.1) + mini_mime (>= 1.1.0) + activesupport (6.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) builder (3.2.4) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.9) crass (1.0.6) erubi (1.10.0) - faraday (1.4.1) + faraday (1.4.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) faraday-net_http (~> 1.0) faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-net_http (1.0.1) faraday-net_http_persistent (1.1.0) globalid (0.4.2) activesupport (>= 4.2.0) - google-protobuf (3.15.8) + google-protobuf (3.17.3) i18n (1.8.10) concurrent-ruby (~> 1.0) - loofah (2.9.1) + loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) marcel (1.0.1) method_source (1.0.0) - mini_mime (1.0.3) - mini_portile2 (2.5.1) + mini_mime (1.1.0) + mini_portile2 (2.5.3) minitest (5.14.4) multipart-post (2.1.1) nio4r (2.5.7) - nokogiri (1.11.3) + nokogiri (1.11.7) mini_portile2 (~> 2.5.0) racc (~> 1.4) - opentelemetry-api (0.17.0) - opentelemetry-common (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-exporter-otlp (0.17.0) + opentelemetry-api (1.0.0.rc2) + opentelemetry-common (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-exporter-otlp (0.20.0) google-protobuf (~> 3.7) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-sdk (~> 0.17.0) - opentelemetry-instrumentation-active_model_serializers (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-all (0.17.0) - opentelemetry-instrumentation-active_model_serializers (~> 0.17.0) - opentelemetry-instrumentation-concurrent_ruby (~> 0.17.0) - opentelemetry-instrumentation-dalli (~> 0.17.0) - opentelemetry-instrumentation-delayed_job (~> 0.17.0) - opentelemetry-instrumentation-ethon (~> 0.17.0) - opentelemetry-instrumentation-excon (~> 0.17.0) - opentelemetry-instrumentation-faraday (~> 0.17.0) - opentelemetry-instrumentation-graphql (~> 0.17.0) - opentelemetry-instrumentation-http (~> 0.17.0) - opentelemetry-instrumentation-http_client (~> 0.17.0) - opentelemetry-instrumentation-lmdb (~> 0.17.0) - opentelemetry-instrumentation-mongo (~> 0.17.0) - opentelemetry-instrumentation-mysql2 (~> 0.17.0) - opentelemetry-instrumentation-net_http (~> 0.17.0) - opentelemetry-instrumentation-pg (~> 0.17.0) - opentelemetry-instrumentation-rack (~> 0.17.0) - opentelemetry-instrumentation-rails (~> 0.17.0) - opentelemetry-instrumentation-redis (~> 0.17.0) - opentelemetry-instrumentation-restclient (~> 0.17.0) - opentelemetry-instrumentation-ruby_kafka (~> 0.17.0) - opentelemetry-instrumentation-sidekiq (~> 0.17.0) - opentelemetry-instrumentation-sinatra (~> 0.17.0) - opentelemetry-instrumentation-base (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-concurrent_ruby (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-dalli (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-delayed_job (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-ethon (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-excon (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-faraday (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-graphql (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-http (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-http_client (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-lmdb (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-mongo (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-mysql2 (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-net_http (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-pg (0.17.1) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-rack (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-rails (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-rack (~> 0.17.0) - opentelemetry-instrumentation-redis (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-restclient (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-ruby_kafka (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-sidekiq (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-instrumentation-sinatra (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - opentelemetry-sdk (0.17.0) - opentelemetry-api (~> 0.17.0) - opentelemetry-common (~> 0.17.0) - opentelemetry-instrumentation-base (~> 0.17.0) - puma (5.2.2) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-sdk (~> 1.0.0.rc2) + opentelemetry-instrumentation-active_job (0.1.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-active_model_serializers (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-all (0.19.0) + opentelemetry-instrumentation-active_job (~> 0.1.0) + opentelemetry-instrumentation-active_model_serializers (~> 0.18.1) + opentelemetry-instrumentation-bunny (~> 0.18.1) + opentelemetry-instrumentation-concurrent_ruby (~> 0.18.1) + opentelemetry-instrumentation-dalli (~> 0.18.1) + opentelemetry-instrumentation-delayed_job (~> 0.18.1) + opentelemetry-instrumentation-ethon (~> 0.19.0) + opentelemetry-instrumentation-excon (~> 0.19.0) + opentelemetry-instrumentation-faraday (~> 0.19.0) + opentelemetry-instrumentation-graphql (~> 0.18.1) + opentelemetry-instrumentation-http (~> 0.19.0) + opentelemetry-instrumentation-http_client (~> 0.19.0) + opentelemetry-instrumentation-koala (~> 0.18.1) + opentelemetry-instrumentation-lmdb (~> 0.18.1) + opentelemetry-instrumentation-mongo (~> 0.18.1) + opentelemetry-instrumentation-mysql2 (~> 0.18.1) + opentelemetry-instrumentation-net_http (~> 0.19.0) + opentelemetry-instrumentation-pg (~> 0.18.1) + opentelemetry-instrumentation-rack (~> 0.19.0) + opentelemetry-instrumentation-rails (~> 0.18.1) + opentelemetry-instrumentation-redis (~> 0.20.0) + opentelemetry-instrumentation-resque (~> 0.1.0) + opentelemetry-instrumentation-restclient (~> 0.19.0) + opentelemetry-instrumentation-ruby_kafka (~> 0.18.1) + opentelemetry-instrumentation-sidekiq (~> 0.19.0) + opentelemetry-instrumentation-sinatra (~> 0.19.0) + opentelemetry-instrumentation-base (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-bunny (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-concurrent_ruby (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-dalli (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-delayed_job (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-ethon (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-excon (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-faraday (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-graphql (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-http (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-http_client (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-koala (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-lmdb (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-mongo (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-mysql2 (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-net_http (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-pg (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-rack (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-rails (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-rack (~> 0.19.0) + opentelemetry-instrumentation-redis (0.20.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-resque (0.1.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-restclient (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-ruby_kafka (0.18.1) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-sidekiq (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-instrumentation-sinatra (0.19.0) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-instrumentation-base (~> 0.18.1) + opentelemetry-sdk (1.0.0.rc2) + opentelemetry-api (~> 1.0.0.rc2) + opentelemetry-common (~> 0.19.0) + opentelemetry-instrumentation-base (~> 0.18.1) + puma (5.3.2) nio4r (~> 2.0) racc (1.5.2) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.3.1) - actioncable (= 6.1.3.1) - actionmailbox (= 6.1.3.1) - actionmailer (= 6.1.3.1) - actionpack (= 6.1.3.1) - actiontext (= 6.1.3.1) - actionview (= 6.1.3.1) - activejob (= 6.1.3.1) - activemodel (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + rails (6.1.4) + actioncable (= 6.1.4) + actionmailbox (= 6.1.4) + actionmailer (= 6.1.4) + actionpack (= 6.1.4) + actiontext (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activemodel (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) bundler (>= 1.15.0) - railties (= 6.1.3.1) + railties (= 6.1.4) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) + railties (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) method_source - rake (>= 0.8.7) + rake (>= 0.13) thor (~> 1.0) rake (13.0.3) ruby2_keywords (0.0.4) @@ -250,7 +271,7 @@ GEM thor (1.1.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) - websocket-driver (0.7.3) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) zeitwerk (2.4.2) @@ -262,7 +283,7 @@ DEPENDENCIES faraday opentelemetry-exporter-otlp opentelemetry-instrumentation-all - opentelemetry-sdk + opentelemetry-sdk (~> 1.0.0.rc2) puma rails diff --git a/ruby/frontend/frontend.ru b/ruby/frontend/frontend.ru index 73ca8978..d274747f 100644 --- a/ruby/frontend/frontend.ru +++ b/ruby/frontend/frontend.ru @@ -3,7 +3,6 @@ # SPDX-License-Identifier: Apache-2.0 require 'action_controller/railtie' -require 'opentelemetry/sdk' require 'faraday' require 'opentelemetry/sdk' @@ -13,11 +12,6 @@ begin OpenTelemetry::SDK.configure do |c| c.service_name = ENV['SERVICE_NAME'] || "frontend-ruby" c.use_all() - c.add_span_processor( - OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new( - OpenTelemetry::Exporter::OTLP::Exporter.new() - ) - ) end rescue OpenTelemetry::SDK::ConfigurationError => e puts "What now?" @@ -44,10 +38,10 @@ end class GreetingsController < ActionController::Base def index - name = NameClient.get_name - message = MessageClient.get_message + @name = NameClient.get_name + @message = MessageClient.get_message Tracer.in_span("🎨 render message ✨") do |span| - render plain: "Hello #{name}, #{message}" + render inline: "Hello <%= @name %>, <%= @message %>" end end end diff --git a/ruby/message-service/message.ru b/ruby/message-service/message.ru index 66af972f..b715be2e 100644 --- a/ruby/message-service/message.ru +++ b/ruby/message-service/message.ru @@ -36,7 +36,7 @@ end # The configuration is compatible with Rails 6.0 class MessageApp < Rails::Application config.root = __dir__ - config.hosts << 'example.org' + config.hosts << 'message' secrets.secret_key_base = 'secret_key_base' config.eager_load = false config.logger = Logger.new($stdout)