Skip to content

Commit

Permalink
Merge pull request #6 from FHIR/dev
Browse files Browse the repository at this point in the history
OpenTelemetry initial implementation
  • Loading branch information
GinoCanessa authored Aug 29, 2024
2 parents 834da0b + a549108 commit b0f185e
Show file tree
Hide file tree
Showing 19 changed files with 1,401 additions and 24 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ghcr-docker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Publish on GitHub Container Registry
# Basics from https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions
on:
push:
branches:
- main
workflow_dispatch:
workflow_run:
workflows: ['Tests']
types: [completed]

env:
REGISTRY: ghcr.io
Expand All @@ -12,6 +13,7 @@ env:
jobs:
build-and-push-image:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

permissions:
contents: read
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/nuget-tool.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Publish dotnet tool
# Basics from https://docs.microsoft.com/en-us/azure/dev-spaces/how-to/github-actions
on:
push:
branches:
- main
workflow_dispatch:
workflow_run:
workflows: ['Tests']
types: [completed]

jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3

Expand Down
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# fhir-candle
[![Tests](https://github.com/FHIR/fhir-candle/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/FHIR/fhir-candle/actions/workflows/build-and-test.yml)
[![Publish dotnet tool](https://img.shields.io/nuget/v/fhir-candle.svg)](https://github.com/FHIR/fhir-candle/actions/workflows/nuget-tool.yml)
[![Publish Docker image on GitHub CR](https://github.com/FHIR/fhir-candle/actions/workflows/ghcr-docker.yml/badge.svg)](https://github.com/FHIR/fhir-candle/actions/workflows/ghcr-docker.yml)
[![Deploy to subscriptions.argo.run](https://github.com/FHIR/fhir-candle/actions/workflows/argo-subscriptions.yml/badge.svg)](https://github.com/FHIR/fhir-candle/actions/workflows/argo-subscriptions.yml)
[![Publish Docker image to ghcr.io](https://github.com/FHIR/fhir-candle/actions/workflows/ghcr-docker.yml/badge.svg)](https://github.com/FHIR/fhir-candle/actions/workflows/ghcr-docker.yml)
[![Deploy to `argo.run`](https://github.com/FHIR/fhir-candle/actions/workflows/argo-ris.yml/badge.svg)](https://github.com/FHIR/fhir-candle/actions/workflows/argo-ris.yml)

When you need a small FHIR.

Expand Down Expand Up @@ -46,7 +46,7 @@ For more information, please see the [Security Readme](SECURITY.MD).

# Documentation

## Get Started
## Get Started with .Net

[Install .NET 8 or newer](https://get.dot.net) and run this command:

Expand All @@ -61,7 +61,28 @@ Start a FHIR server and open the browser by running:
fhir-candle -o
```

### Cloning this repository
## Get Started with Docker

[Install Docker](https://docs.docker.com/engine/install/) and run these commands:

```
docker pull ghcr.io/fhir/fhir-candle:latest
docker run -p 8080:5826 ghcr.io/fhir/fhir-candle:latest
```

This will run the docker image with the default configuration, mapping port 5826 from the container to port 8080 in the host.
Once running, you can access http://localhost:8080/ in the browser to access the fhir-candle's UI or access the default endpoints:
* http://localhost:8080/fhir/r4/ for FHIR R4
* http://localhost:8080/fhir/r4b/ for FHIR R4B
* http://localhost:8080/fhir/r5/ for FHIR R5

Note that additional arguments can be passed directly via the `docker run` command. For example, to run the server with only an R4 endpoint named 'test':
```
docker run -p 8080:5826 ghcr.io/fhir/fhir-candle:latest --r4 test
```


## Get Started via cloning this repository

To run the default server from the command line:
```
Expand Down Expand Up @@ -123,6 +144,16 @@ of the subscriptions RI, the following command can be used:
fhir-candle --reference-implementation subscriptions --load-package hl7.fhir.uv.subscriptions-backport#1.1.0 --load-examples false --protect-source true -m 1000
```

## Using OpenTelemetry

OpenTelemetry instrumentation can be enabled via either the `--otel-otlp-endpoint` argument or the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable.
For example, to send traces to a Jaeger instance running on `localhost:4317`: `fhir-candle -o --otel-otlp-endpoint http://localhost:4317`.

For local testing, you can run a Jaeger instance in Docker with the following command:

```
docker run --rm --name jaeger -p 4317:4317 -p 4318:4318 -p 5778:5778 -p 16686:16686 -p 14250:14250 jaegertracing/all-in-one:latest
```

# To-Do
Note: items are unsorted within their priorities
Expand Down
Binary file added logos/logo-simple-500x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logos/logo-simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b0f185e

Please sign in to comment.