Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
acf1cdc
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB Apr 26, 2023
c842150
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB Apr 26, 2023
b83ea99
Merge remote-tracking branch 'origin/opensearch-observability-otel' i…
YANG-DB Apr 26, 2023
9850688
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB May 1, 2023
0db3223
Merge branch 'main' into opensearch-observability-otel
YANG-DB May 2, 2023
bf41276
add curl to the basic docker O/S
YANG-DB May 3, 2023
4292136
Merge pull request #1 from open-telemetry/main
YANG-DB May 3, 2023
f0600be
add monitoring & opinionated assets for this demo
YANG-DB May 4, 2023
418d196
Merge remote-tracking branch 'origin/opensearch-observability-otel' i…
YANG-DB May 4, 2023
b0db9fc
export F/E & Load-Generator port services
YANG-DB May 8, 2023
9629fb7
Merge pull request #2 from open-telemetry/main
YANG-DB May 8, 2023
ba709f1
fix jaeger service name
YANG-DB May 9, 2023
daedfab
adding nginx as frontend proxy, fluent-bit.conf as log emitter
YANG-DB May 10, 2023
d58ed46
adding nginx & fluent-bit docs
YANG-DB May 10, 2023
a8e3f5d
Merge pull request #3 from open-telemetry/main
YANG-DB May 15, 2023
b6a018a
adding integrationbs docker-compose service for assets loading into o…
YANG-DB May 15, 2023
6031c17
Merge remote-tracking branch 'origin/opensearch-observability-otel' i…
YANG-DB May 15, 2023
92240ba
adding datasource for query prometheus
YANG-DB May 15, 2023
12d52cb
adding architecture.md including images
YANG-DB May 15, 2023
85fefce
add images and service links
YANG-DB May 16, 2023
73e2680
add jaeger-agent container name
YANG-DB May 16, 2023
f6067c6
add data-prepper support for traces ingestion & serviceMap creation
YANG-DB May 16, 2023
24d278c
fix auth issues for data-prepper
YANG-DB May 16, 2023
7410478
add documentation for different ingestion capabilities
YANG-DB May 16, 2023
d8a2abf
Merge pull request #4 from YANG-DB/otel-opensearch-data-prep
YANG-DB May 16, 2023
fe655cc
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB Apr 26, 2023
0be11cd
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB May 1, 2023
f54a011
add curl to the basic docker O/S
YANG-DB May 3, 2023
90c9a61
add monitoring & opinionated assets for this demo
YANG-DB May 4, 2023
379372a
[shippingservice] update rust version and dependencies (#865)
julianocosta89 May 3, 2023
6ae5c80
[load generator] Bump loagen dependencies (#869)
julianocosta89 May 3, 2023
a69595a
[grafana] fix demo dashboard to be compatible with spanmetrics connec…
fatsheep9146 May 3, 2023
1c28220
export F/E & Load-Generator port services
YANG-DB May 8, 2023
42537be
[kafka] remove KRaft mode support workarounds (#880)
styblope May 8, 2023
8bd25ad
enabling batch span processor metrics for quoteservice (#878)
brettmc May 8, 2023
2cc7484
Generate random errors in cartservice (#824)
alanwest May 8, 2023
54e3b6f
fix jaeger service name
YANG-DB May 9, 2023
daf0d08
adding nginx as frontend proxy, fluent-bit.conf as log emitter
YANG-DB May 10, 2023
88e0171
adding nginx & fluent-bit docs
YANG-DB May 10, 2023
d292741
adding integrationbs docker-compose service for assets loading into o…
YANG-DB May 15, 2023
6f55bd8
[currencyservice] Fix OTel C++ build and update OTel version (#886)
julianocosta89 May 12, 2023
193552f
adding datasource for query prometheus
YANG-DB May 15, 2023
febdfe1
adding architecture.md including images
YANG-DB May 15, 2023
904ed80
add images and service links
YANG-DB May 16, 2023
9cf4326
add jaeger-agent container name
YANG-DB May 16, 2023
c14aa11
add data-prepper support for traces ingestion & serviceMap creation
YANG-DB May 16, 2023
a55d74f
fix auth issues for data-prepper
YANG-DB May 16, 2023
6032e3e
add documentation for different ingestion capabilities
YANG-DB May 16, 2023
5954bdf
Merge remote-tracking branch 'origin/opensearch-observability-otel' i…
YANG-DB May 18, 2023
4d1d72e
add assets manager flast app for loading the integration assets
YANG-DB May 18, 2023
91f7a0e
remove experimental assets mgr app
YANG-DB May 18, 2023
78b38e6
Opensearch otel demo observability tutorial (#5)
YANG-DB May 23, 2023
20e05bb
Add .whitesource configuration file
mend-for-github.amrom.workers.dev[bot] May 26, 2023
fe8a551
Merge pull request #2 from open-telemetry/main
YANG-DB May 26, 2023
b422bc7
Update local-config.md
YANG-DB May 26, 2023
4431d7b
Update README.md
YANG-DB May 26, 2023
ddfd510
Merge pull request #3 from opensearch-project/opensearch-observabilit…
YANG-DB May 26, 2023
206744d
Merge pull request #1 from opensearch-project/whitesource/configure
YANG-DB May 26, 2023
ca117ba
chore(deps): update dependency com.fasterxml.jackson.core:jackson-dat…
mend-for-github.amrom.workers.dev[bot] May 30, 2023
79478c6
chore(deps): update dependency io.grpc:grpc-protobuf to v1.45.2 (#5)
mend-for-github.amrom.workers.dev[bot] May 30, 2023
d7ec3cb
chore(deps): update dependency org.apache.kafka:kafka-clients to v3.4…
mend-for-github.amrom.workers.dev[bot] May 30, 2023
4fc639a
chore(deps): update dependency requests to v2.31.0 (#7)
mend-for-github.amrom.workers.dev[bot] May 30, 2023
2bcfb4d
update url for the new opensearch otel demo repo
YANG-DB May 30, 2023
bf52b6b
update url for the new opensearch otel demo repo
YANG-DB May 30, 2023
86fcbf9
Merge remote-tracking branch 'opensearch-otel-demo/minor-fixes-docker…
YANG-DB May 31, 2023
7c1d497
update max retry
YANG-DB May 31, 2023
bf967ec
Merge remote-tracking branch 'opensearch-otel-demo/minor-fixes-docker…
YANG-DB May 31, 2023
3b47294
Merge remote-tracking branch 'opensearch-otel-demo/minor-fixes-docker…
YANG-DB May 31, 2023
84ff7cf
Merge remote-tracking branch 'opensearch-otel-demo/minor-fixes-docker…
YANG-DB May 31, 2023
8021ae6
Merge pull request #9 from opensearch-project/minor-fixes-docker
anirudha May 31, 2023
7f2f17c
Update docker-compose.yml
anirudha May 31, 2023
8c9834c
fix integrations script connections retry
YANG-DB May 31, 2023
0d1eede
Merge pull request #10 from opensearch-project/fix_integration_connec…
anirudha May 31, 2023
0797504
update bytes map to long and status to int (#11)
ps48 Jun 1, 2023
1f90bf8
Update README.md
YANG-DB Jun 1, 2023
b2f6496
Integration config parser support (#12)
YANG-DB Jun 2, 2023
3ade28c
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB Apr 26, 2023
d7a8157
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB May 1, 2023
b857ff8
add curl to the basic docker O/S
YANG-DB May 3, 2023
ed0c29c
add monitoring & opinionated assets for this demo
YANG-DB May 4, 2023
d23d9e6
export F/E & Load-Generator port services
YANG-DB May 8, 2023
5b6fff1
fix jaeger service name
YANG-DB May 9, 2023
2631a34
adding nginx as frontend proxy, fluent-bit.conf as log emitter
YANG-DB May 10, 2023
dabfdec
adding nginx & fluent-bit docs
YANG-DB May 10, 2023
bd8c1bf
adding integrationbs docker-compose service for assets loading into o…
YANG-DB May 15, 2023
5569094
adding datasource for query prometheus
YANG-DB May 15, 2023
0fc93f6
adding architecture.md including images
YANG-DB May 15, 2023
bc06c45
add images and service links
YANG-DB May 16, 2023
c1e4661
add jaeger-agent container name
YANG-DB May 16, 2023
dcb2455
add data-prepper support for traces ingestion & serviceMap creation
YANG-DB May 16, 2023
7df4285
fix auth issues for data-prepper
YANG-DB May 16, 2023
dd0154b
add documentation for different ingestion capabilities
YANG-DB May 16, 2023
10ecd54
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB Apr 26, 2023
9aa3934
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB Apr 26, 2023
5e57e1d
Initial setup of Observability OTEL demo using Opensearch as store
YANG-DB May 1, 2023
04a9900
add monitoring & opinionated assets for this demo
YANG-DB May 4, 2023
fd9ef85
export F/E & Load-Generator port services
YANG-DB May 8, 2023
72e4aef
fix jaeger service name
YANG-DB May 9, 2023
9924223
adding nginx as frontend proxy, fluent-bit.conf as log emitter
YANG-DB May 10, 2023
ae25d49
adding nginx & fluent-bit docs
YANG-DB May 10, 2023
0148bb3
adding integrationbs docker-compose service for assets loading into o…
YANG-DB May 15, 2023
a4e1d2f
adding datasource for query prometheus
YANG-DB May 15, 2023
d8fbcd1
adding architecture.md including images
YANG-DB May 15, 2023
6e49f5f
add images and service links
YANG-DB May 16, 2023
128aaae
add jaeger-agent container name
YANG-DB May 16, 2023
c260dee
add data-prepper support for traces ingestion & serviceMap creation
YANG-DB May 16, 2023
15f1280
fix auth issues for data-prepper
YANG-DB May 16, 2023
0a318aa
add documentation for different ingestion capabilities
YANG-DB May 16, 2023
0f37545
add assets manager flast app for loading the integration assets
YANG-DB May 18, 2023
9d1b3ea
remove experimental assets mgr app
YANG-DB May 18, 2023
ec75650
Opensearch otel demo observability tutorial (#5)
YANG-DB May 23, 2023
cc5e580
Update local-config.md
YANG-DB May 26, 2023
e2359d5
Update README.md
YANG-DB May 26, 2023
cc089a6
Add .whitesource configuration file
mend-for-github.amrom.workers.dev[bot] May 26, 2023
0a41f77
chore(deps): update dependency com.fasterxml.jackson.core:jackson-dat…
mend-for-github.amrom.workers.dev[bot] May 30, 2023
c243fcc
chore(deps): update dependency io.grpc:grpc-protobuf to v1.45.2 (#5)
mend-for-github.amrom.workers.dev[bot] May 30, 2023
cc19616
chore(deps): update dependency org.apache.kafka:kafka-clients to v3.4…
mend-for-github.amrom.workers.dev[bot] May 30, 2023
17399e9
chore(deps): update dependency requests to v2.31.0 (#7)
mend-for-github.amrom.workers.dev[bot] May 30, 2023
c4c4329
update url for the new opensearch otel demo repo
YANG-DB May 30, 2023
43ed458
Update docker-compose.yml
anirudha May 31, 2023
2dbc0a7
fix integrations script connections retry
YANG-DB May 31, 2023
903d966
update bytes map to long and status to int (#11)
ps48 Jun 1, 2023
5deeb78
Update README.md
YANG-DB Jun 1, 2023
db5fb52
Integration config parser support (#12)
YANG-DB Jun 2, 2023
597be40
upstream updates
YANG-DB Jun 2, 2023
650653f
upstream updates
YANG-DB Jun 2, 2023
d7d1bca
update http.template mapping (#15)
YANG-DB Jun 2, 2023
bafa47b
adding standard opensearch github dev / maintenance spec: (#16)
YANG-DB Jun 4, 2023
ddc5b46
fixing opensearch demo link for OpenTelemetry (#14)
MitchellGale Jun 6, 2023
f6c32ed
upstream updates (#17)
YANG-DB Jun 9, 2023
cc587f7
Merge branch 'open-telemetry:main' into main
YANG-DB Jun 9, 2023
83bb74c
add untriaged gh workflow (#18)
YANG-DB Jun 10, 2023
c496676
[cartservice] Update .NET OTel to 1.5.0 (#935) (#23)
YANG-DB Jun 15, 2023
de73c8b
Merge branch 'open-telemetry:main' into main
YANG-DB Jun 15, 2023
1f3e8f7
add red metrics from spans (#21)
YANG-DB Jun 15, 2023
b7cdb84
Merge branch 'open-telemetry:main' into main
YANG-DB Jun 21, 2023
0b90026
add integration dependency on the catalog repository for getting all …
YANG-DB Jun 21, 2023
9c867b5
fix data-prepper image to a stable version
YANG-DB Jun 21, 2023
d9f0bae
add error wrapping for integration script
YANG-DB Jun 21, 2023
04d9489
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jun 21, 2023
0aeef46
update opensearch version configuration as an env var
YANG-DB Jun 21, 2023
ffd3aeb
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jun 27, 2023
f70840a
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jun 27, 2023
3c7045c
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jun 27, 2023
2ce8f34
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jul 7, 2023
36c1388
update opensearch to 2.8
YANG-DB Jul 7, 2023
51a4d85
Merge remote-tracking branch 'origin/main'
YANG-DB Jul 8, 2023
33de211
Upstream changes needed merge (#41)
YANG-DB Jul 8, 2023
3cb95e6
Merge branch 'open-telemetry:main' into main
YANG-DB Jul 8, 2023
f05c408
Merge branch 'opensearch-project:main' into main
YANG-DB Jul 8, 2023
baa1841
Update dependency io.grpc:grpc-netty to v1.50.3 (#47)
mend-for-github.amrom.workers.dev[bot] Jul 15, 2023
bd4fdde
Merge branch 'opensearch-project:main' into main
YANG-DB Jul 15, 2023
9a91c19
upstream updates (#52)
YANG-DB Jul 18, 2023
90d63ec
Merge branch 'opensearch-project:main' into main
YANG-DB Jul 18, 2023
73a2e0f
Merge branch 'main' into opensearch-monitoring-prometheus-metrics
YANG-DB Jul 18, 2023
0e8fec0
update locust to use nginx proxy
YANG-DB Jul 18, 2023
2fb8bb1
Merge remote-tracking branch 'origin/opensearch-monitoring-prometheus…
YANG-DB Jul 18, 2023
8264d5f
Merge remote-tracking branch 'upstream/main' into opensearch-monitori…
YANG-DB Aug 2, 2023
d35d89e
Update frauddetectionservice (#55)
mend-for-github.amrom.workers.dev[bot] Aug 2, 2023
745cc06
Update adservice (#48)
mend-for-github.amrom.workers.dev[bot] Aug 2, 2023
7ca92bc
update upstream changes
YANG-DB Aug 2, 2023
1b025d3
update upstream changes
YANG-DB Aug 2, 2023
b130d5e
update opensearch for 2.9
YANG-DB Aug 2, 2023
4336309
fix: Fixing tracetest configuration (#65)
xoscar Sep 19, 2023
dbe873a
chore(deps): update loadgenerator (#67)
mend-for-github.amrom.workers.dev[bot] Oct 6, 2023
50b6772
Merge remote-tracking branch 'upstream/main'
YANG-DB Oct 20, 2023
ade5c3b
update upstream changes
YANG-DB Nov 6, 2023
e2e6770
update upstream changes
YANG-DB Nov 6, 2023
8816e1d
update upstream changes
YANG-DB Nov 6, 2023
1774665
update upstream changes
YANG-DB Nov 6, 2023
a61bd83
update upstream changes
YANG-DB Nov 6, 2023
db1aef7
update upstream changes
YANG-DB Nov 6, 2023
61c3918
update upstream changes
YANG-DB Nov 6, 2023
c347720
remove https in favor of http
YANG-DB Nov 6, 2023
3c07b02
restore https
YANG-DB Nov 6, 2023
3a26e77
update data-prepper config files
YANG-DB Nov 6, 2023
f704c7e
Merge branch 'main' into update-latest-upstream-patch
YANG-DB Nov 7, 2023
4810682
Merge remote-tracking branch 'origin/update-latest-upstream-patch'
YANG-DB Nov 7, 2023
60889ad
fix opensearch service name for jaeger-query
YANG-DB Nov 7, 2023
f823ced
remove jaeger-query
YANG-DB Nov 7, 2023
81cc672
update data-prepper pipelines
YANG-DB Nov 7, 2023
dcd7f3f
Merge remote-tracking branch 'origin/data-prepper-pipelines' into dat…
YANG-DB Nov 7, 2023
1be0e03
update data-prepper pipelines
YANG-DB Nov 7, 2023
d9992df
update data-prepper pipelines
YANG-DB Nov 7, 2023
29385c1
update data-prepper pipelines
YANG-DB Nov 20, 2023
6c37467
Merge branch 'main' into data-prepper-pipelines
YANG-DB Nov 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update url for the new opensearch otel demo repo
update integration script to log into a file
update the README.md for the otel-collector pipline descrition
update ports for the otel-col health-check
add memory_limiter / servicegraph processors for otel-col

Signed-off-by: YANGDB <[email protected]>
  • Loading branch information
YANG-DB committed Jun 2, 2023
commit c4c432922f7f7d7af6846ba1ecee12ae48809745
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ENV_PLATFORM=local
# OpenTelemetry Collector
OTEL_COLLECTOR_HOST=otelcol
OTEL_COLLECTOR_PORT=4317
OTEL_COLLECTOR_HEALTH_CHECK_PORT=1313
OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT}
PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4318/v1/traces

Expand Down
8 changes: 4 additions & 4 deletions .github/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ Backend supportive services
- [Frontend Nginx Proxy](http://nginx:90) *(replacement for _Frontend-Proxy_)*
- See [description](../src/nginx-otel/README.md)
- [OpenSearch](https://opensearch-node1:9200)
- See [description](https://github.com/YANG-DB/opentelemetry-demo/blob/12d52cbb23bbf4226f6de2dfec840482a0a7d054/docker-compose.yml#L697)
- See [description](https://github.com/opensearch-project/opentelemetry-demo/blob/12d52cbb23bbf4226f6de2dfec840482a0a7d054/docker-compose.yml#L697)
- [Dashboards](http://opensearch-dashboards:5601)
- See [description](https://github.com/YANG-DB/opentelemetry-demo/blob/12d52cbb23bbf4226f6de2dfec840482a0a7d054/docker-compose.yml#L747)
- See [description](https://github.com/opensearch-project/opentelemetry-demo/blob/12d52cbb23bbf4226f6de2dfec840482a0a7d054/docker-compose.yml#L747)
- [Prometheus](http://prometheus:9090)
- See [description](https://github.com/YANG-DB/opentelemetry-demo/blob/12d52cbb23bbf4226f6de2dfec840482a0a7d054/docker-compose.yml#L674)
- See [description](https://github.com/opensearch-project/opentelemetry-demo/blob/12d52cbb23bbf4226f6de2dfec840482a0a7d054/docker-compose.yml#L674)
- [Feature-Flag](http://feature-flag-service:8881)
- See [description](../src/featureflagservice/README.md)
- [Grafana](http://grafana:3000)
- See [description](https://github.com/YANG-DB/opentelemetry-demo/blob/12d52cbb23bbf4226f6de2dfec840482a0a7d054/docker-compose.yml#L637)
- See [description](https://github.com/opensearch-project/opentelemetry-demo/blob/12d52cbb23bbf4226f6de2dfec840482a0a7d054/docker-compose.yml#L637)

### Services Topology
The next diagram shows the docker compose services dependencies
Expand Down
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -677,10 +677,11 @@ services:
- ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml
- ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml
ports:
- "4317" # OTLP over gRPC receiver
- "4318:4318" # OTLP over HTTP receiver
- "9464" # Prometheus exporter
- "8888" # metrics endpoint
- "4317" # OTLP over gRPC receiver
- "4318:4318" # OTLP over HTTP receiver
- "13133:13133" # health check port
- "9464" # Prometheus exporter
- "8888" # metrics endpoint
depends_on:
- jaeger-agent
- data-prepper
Expand Down
3 changes: 3 additions & 0 deletions src/dataprepper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ There are some additional `trace.group` related fields which are not part of the
- traceGroupFields.durationInNanos - A derived field, the durationInNanos of the trace's root span.

```
### Metrics from Traces Processors

Adding new processors for creating metrics for logs and traces that pass through [Data Prepper](https://opensearch.org/blog/Announcing-Data-Prepper-2.1.0/)
48 changes: 34 additions & 14 deletions src/integrations/src/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
# For testing only. Don't store credentials in code.
auth = ('admin', 'admin')

# Configure logging
logging.basicConfig(format='%(asctime)s [%(levelname)s] %(message)s', level=logging.INFO)
# Configure logging to file
logging.basicConfig(
filename='application.log', # The file where the logs should be written to
filemode='a', # Append mode, use 'w' for overwriting each time the script is run
format='%(asctime)s [%(levelname)s] %(message)s',
level=logging.INFO
)
logger = logging.getLogger(__name__)

# Create the client with SSL/TLS enabled, but hostname verification disabled.
Expand All @@ -28,10 +33,9 @@
ssl_show_warn = False
)
# verify connection to opensearch
# verify connection to opensearch
def test_connection():
max_retries = 30 # Maximum number of retries
retry_interval = 10 # Wait for 10 seconds between retries
max_retries = 100 # Maximum number of retries
retry_interval = 20 # Wait for 20 seconds between retries

for i in range(max_retries):
try:
Expand All @@ -42,15 +46,15 @@ def test_connection():
verify=False # Disable SSL verification
)
response.raise_for_status() # Raise an exception if the request failed
print('Successfully connected to OpenSearch')
logger.info('Successfully connected to OpenSearch')
return # Exit the function if connection is successful
except requests.HTTPError as e:
logging.error(f'Failed to connect to OpenSearch, error: {str(e)}')

print(f'Attempt {i + 1} failed, waiting for {retry_interval} seconds before retrying...')
logger.info(f'Attempt {i + 1} failed, waiting for {retry_interval} seconds before retrying...')
time.sleep(retry_interval)

print(f'Failed to connect to OpenSearch after {max_retries} attempts')
logger.error(f'Failed to connect to OpenSearch after {max_retries} attempts')
exit(1) # Exit the program with an error code

# create mapping components to compose the different observability categories
Expand All @@ -62,7 +66,7 @@ def create_mapping_components(client):
mapping = json.load(f)

template_name = os.path.splitext(filename)[0] # Remove the .mapping extension
print(f'About to load template: {template_name}')
logger.info(f'About to load template: {template_name}')
# Create the component template
try:
response = requests.put(
Expand All @@ -74,7 +78,6 @@ def create_mapping_components(client):
)
response.raise_for_status() # Raise an exception if the request failed
logger.info(f'Successfully created component template: {template_name}')
print(f'Successfully created component template: {template_name}')
except requests.HTTPError as e:
logger.error(f'Failed to create component template: {template_name}, error: {str(e)}')

Expand All @@ -87,12 +90,12 @@ def create_mapping_templates(client):
mapping = json.load(f)

template_name = os.path.splitext(filename)[0] # Remove the .mapping extension
print(f'About to created index template: {template_name}')
logger.info(f'About to created index template: {template_name}')

# Create the template
try:
client.indices.put_index_template(name=template_name, body=mapping)
print(f'Successfully created index template: {template_name}')
logger.info(f'Successfully created index template: {template_name}')
except OpenSearchException as e:
logger.error(f'Failed to create index template: {template_name}, error: {str(e)}')

Expand Down Expand Up @@ -143,10 +146,28 @@ def load_dashboards():
# create the data_streams based on the list given in the data-stream.json file
def create_datasources():
datasource_dir = '../datasource/'
# get current list of data sources
try:
response = requests.get(
url=f'https://{opensearch_host}:9200/_plugins/_query/_datasources',
auth=HTTPBasicAuth('admin', 'admin'),
verify=False, # Disable SSL verification
headers={'Content-Type': 'application/json'}
)
response.raise_for_status() # Raise an exception if the request failed
current_datasources = response.json() # convert response to json
except requests.HTTPError as e:
logger.error(f'Failed to fetch datasources, error: {str(e)}')

for filename in os.listdir(datasource_dir):
if filename.endswith('.json'):
with open(os.path.join(datasource_dir, filename), 'r') as f:
datasource = json.load(f)
# check if datasource already exists
if any(d['name'] == datasource['name'] for d in current_datasources):
logger.info(f'Datasource already exists: {filename}')
continue # Skip to the next datasource if this one already exists

try:
response = requests.post(
url=f'https://{opensearch_host}:9200/_plugins/_query/_datasources',
Expand All @@ -157,12 +178,11 @@ def create_datasources():
)
response.raise_for_status() # Raise an exception if the request failed
logger.info(f'Successfully created datasource: {filename}')
print(f'Successfully created datasource: {filename}')
except requests.HTTPError as e:
print(f'Failed to create datasource: {filename}, error: {str(e)}')
logger.error(f'Failed to create datasource: {filename}, error: {str(e)}')



if __name__ == '__main__':
# import all assets
test_connection()
Expand Down
129 changes: 129 additions & 0 deletions src/otelcollector/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# OTEL Collector Pipeline

The next diagram describes the Observability signals pipeline defined inside the OTEL collector

```mermaid
%%{
init: {
'theme': 'base',
'themeVariables': {
'primaryColor': '#BB2528',
'primaryTextColor': '#fff',
'primaryBorderColor': '#7C0000',
'lineColor': '#F8B229',
'secondaryColor': '#006100',
'tertiaryColor': '#fff'
}
}
}%%

graph LR
otlp-->otlpReceiverTraces["otlp Receiver"]
style otlpReceiverTraces fill:#f9d,stroke:#333,stroke-width:4px
otlp-->otlpReceiverMetrics["otlp Receiver"]
style otlpReceiverMetrics fill:#f9d,stroke:#333,stroke-width:4px
otlp-->otlpReceiverLogs["otlp Receiver"]
style otlpReceiverLogs fill:#f9d,stroke:#333,stroke-width:4px
otlpServiceGraph-->otlpServiceGraphReceiver["otlp/servicegraph Receiver"]
spanmetrics-->spanmetricsReceiver["spanmetrics Receiver"]

subgraph Traces Pipeline
otlpReceiverTraces-->tracesProcessor["Traces Processor"]
style tracesProcessor fill:#9cf,stroke:#333,stroke-width:4px
tracesProcessor-->otlpExporter["otlp Exporter"]
tracesProcessor-->loggingExporterTraces["Logging Exporter"]

tracesProcessor-->spanmetricsExporter["Spanmetrics Exporter"]
tracesProcessor-->otlp2Exporter["otlp/2 Exporter"]
end

subgraph Metrics/Servicegraph Pipeline
otlpServiceGraphReceiver-->metricsServiceGraphProcessor["Metrics/ServiceGraph Processor"]
style otlpServiceGraphReceiver fill:#f9d,stroke:#333,stroke-width:4px
metricsServiceGraphProcessor-->prometheusServiceGraphExporter["Prometheus/ServiceGraph Exporter"]
style metricsServiceGraphProcessor fill:#9cf,stroke:#333,stroke-width:4px
end

subgraph Metrics Pipeline
otlpReceiverMetrics-->metricsProcessor["Metrics Processor"]
style metricsProcessor fill:#9cf,stroke:#333,stroke-width:4px

spanmetricsReceiver-->metricsProcessor
style spanmetricsReceiver fill:#f9d,stroke:#333,stroke-width:4px
metricsProcessor-->prometheusExporter["Prometheus Exporter"]
metricsProcessor-->loggingExporterMetrics["Logging Exporter"]
end

subgraph Logs Pipeline
otlpReceiverLogs-->logsProcessor["Logs Processor"]
style logsProcessor fill:#9cf,stroke:#333,stroke-width:4px
logsProcessor-->loggingExporterLogs["Logging Exporter"]
end


```

### Traces
The traces pipeline consists of a receiver, multiple processors, and multiple exporters.

**Receiver (otlp):**
This is where the data comes in from. In your configuration, the traces pipeline is using the otlp receiver. OTLP stands for OpenTelemetry Protocol. This receiver is configured to accept data over both gRPC and HTTP protocols. The HTTP protocol is also configured to allow CORS from any origin.

**Processors (memory_limiter, batch, servicegraph):**
Once the data is received, it is processed before being exported. The processors in the traces pipeline are:

1. **memory_limiter:** This processor checks memory usage every second (check_interval: 1s) and ensures it does not exceed 4000 MiB (limit_mib: 4000). It also allows for a spike limit of 800 MiB (spike_limit_mib: 800).

2. **batch:** This processor batches together traces before sending them on to the exporters, improving efficiency.

3. **servicegraph:** This processor is specifically designed for creating a service graph from the traces. It is configured with certain parameters for handling latency histogram buckets, dimensions, store configurations, and so on.

**Exporters (otlp, logging, spanmetrics, otlp/2):**
After processing, the data is sent to the configured exporters:

1. **otlp:** This exporter sends data to an endpoint configured as jaeger:4317 over OTLP with TLS encryption in insecure mode.

2. **logging:** This exporter logs the traces.

3. **spanmetrics:** This is likely a custom exporter defined as a connector in your configuration. It seems to be designed to create metrics from spans, but this is mostly conjecture based on the name.

4. **otlp/2:** This exporter sends data to an endpoint configured as data-prepper:21890 over OTLP with TLS encryption in insecure mode.

### Metrics
**Metrics Pipeline**

This pipeline handles metric data.

- **Receivers (otlp, spanmetrics):**

Metric data comes in from the `otlp` receiver and the `spanmetrics` receiver.
- **Processors (filter, memory_limiter, batch):**
The data is then processed:
1. **filter:** This processor excludes specific metrics. In this configuration, it is set to strictly exclude the queueSize metric.
2. **memory_limiter:** Similar to the traces pipeline, this processor ensures memory usage doesn't exceed a certain limit.
3. **batch:** This processor batches together metrics before sending them to the exporters, enhancing efficiency.

- **Exporters (prometheus, logging):**
The processed data is then exported:
1. **prometheus:** This exporter sends metrics to an endpoint configured as
2. **otelcol:9464**. It also converts resource information to Prometheus labels and enables OpenMetrics.
3. **logging:** This exporter logs the metrics.

### Logs

**Logs Pipeline**

This pipeline handles log data.

- **Receiver (otlp):**

Log data comes in from the otlp receiver.
- **Processors (memory_limiter, batch):**
The data is then processed:
1. **memory_limiter:** Similar to the traces and metrics pipelines, this processor ensures memory usage doesn't exceed a certain limit.
2. **batch:** This processor batches together logs before sending them to the exporter, enhancing efficiency.

- **Exporter (logging):**

The processed data is then exported:
- Logs Pipeline
37 changes: 34 additions & 3 deletions src/otelcollector/otelcol-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ receivers:
allowed_origins:
- "http://*"
- "https://*"
otlp/servicegraph: # Dummy receiver for the metrics pipeline
protocols:
grpc:
endpoint: localhost:12345

exporters:
otlp/2:
Expand All @@ -28,30 +32,57 @@ exporters:
resource_to_telemetry_conversion:
enabled: true
enable_open_metrics: true
prometheus/servicegraph:
endpoint: localhost:9090
namespace: servicegraph

processors:
batch:
memory_limiter:
check_interval: 1s
limit_mib: 4000
spike_limit_mib: 800
filter:
metrics:
exclude:
match_type: strict
metric_names:
- queueSize
servicegraph:
metrics_exporter: prometheus/servicegraph # Exporter to send metrics to
latency_histogram_buckets: [100us, 1ms, 2ms, 6ms, 10ms, 100ms, 250ms] # Buckets for latency histogram
dimensions: [cluster, namespace] # Additional dimensions (labels) to be added to the metrics extracted from the resource and span attributes
store: # Configuration for the in-memory store
ttl: 2s # Value to wait for an edge to be completed
max_items: 200 # Amount of edges that will be stored in the storeMap
cache_loop: 2m # the time to cleans the cache periodically
store_expiration_loop: 10s # the time to expire old entries from the store periodically.
virtual_node_peer_attributes:
- db.name
- rpc.service

connectors:
spanmetrics:

extensions:
health_check: {}

service:
extensions: [health_check]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
processors: [memory_limiter, batch, servicegraph]
exporters: [otlp, logging, spanmetrics, otlp/2]
metrics/servicegraph:
receivers: [otlp/servicegraph]
processors: []
exporters: [prometheus/servicegraph]
metrics:
receivers: [otlp, spanmetrics]
processors: [filter, batch]
processors: [filter, memory_limiter, batch]
exporters: [prometheus, logging]
logs:
receivers: [otlp]
processors: [batch]
processors: [memory_limiter, batch]
exporters: [logging]