Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
76145b8
Enhance documentation and setup scripts for Dynatrace Snowflake Obser…
sebastiankruk Oct 7, 2025
4ff52ed
Update .github/workflows/release.yml
sebastiankruk Oct 7, 2025
7e3d2a0
Update INSTALL.md
sebastiankruk Oct 7, 2025
ce8b529
disabling release on dev/build_artifacts
sebastiankruk Oct 7, 2025
a18ca09
#12 Add dashboard examples: costs monitoring, self-monitoring, and sn…
sebastiankruk Oct 8, 2025
c972446
#12 added link to dashboard examples
sebastiankruk Oct 8, 2025
e52bcaf
Update docs/dashboards/snowflake-security/readme.md
sebastiankruk Oct 8, 2025
973f660
Update CONTRIBUTING.md
sebastiankruk Oct 8, 2025
dccc5c7
Merge pull request #15 from sebastiankruk/dev/dashboard_examples
sebastiankruk Oct 8, 2025
04e9cec
Merge pull request #14 from dynatrace-oss/dev/build_artifacts
sebastiankruk Oct 9, 2025
164f9eb
#6 mocking session.sql for local calls and dumping data used in tests…
sebastiankruk Oct 17, 2025
d690c19
#6 mocking only local tests
sebastiankruk Oct 17, 2025
08fa327
#6 further improving tests
sebastiankruk Oct 17, 2025
1c89d49
#6 making telemetry sender tests always mocked
sebastiankruk Oct 17, 2025
a8a7d3f
#6 improving code quality
sebastiankruk Oct 17, 2025
566427c
#6 extracting JSON payload from OTEL
sebastiankruk Oct 17, 2025
77d6f39
#6 log objects dumped
sebastiankruk Oct 17, 2025
7a1ef60
#6 extracting spans from OTEL stream
sebastiankruk Oct 17, 2025
b21e90b
#6 extracting span content fixed
sebastiankruk Oct 17, 2025
403bc75
#6 regenerated output for analysis
sebastiankruk Oct 17, 2025
1d110e6
#6 complete tests with recording of expected results
sebastiankruk Oct 19, 2025
7251f07
#6 small fixes for quality tests
sebastiankruk Oct 19, 2025
56aff1c
#6 removing more properties generating altering values
sebastiankruk Oct 19, 2025
14128c1
#6 fixing exclusions on endTime and startTime
sebastiankruk Oct 19, 2025
57fa5c7
#6 updating shares test data
sebastiankruk Oct 19, 2025
d8ea26a
#6 testing payload when sent and at the end of the test
sebastiankruk Oct 19, 2025
e187a4f
#6 temporary fix for parallel execution of tests and spans reporting
sebastiankruk Oct 19, 2025
a0d2e64
#6 making tests run sequentially and wait OTLP to flush data
sebastiankruk Oct 20, 2025
8b8df7e
#5 test results update to capture all data from OTLP
sebastiankruk Oct 20, 2025
f8fdc76
#6 tests are finally green
sebastiankruk Oct 20, 2025
088c642
#6 further improving tests
sebastiankruk Oct 20, 2025
9d11687
#6 more tests
sebastiankruk Oct 20, 2025
4e44b13
#6 fixing metric name
sebastiankruk Oct 20, 2025
621b180
#6 another metric name fixed
sebastiankruk Oct 20, 2025
c12bdd5
#6 update expected test results
sebastiankruk Oct 20, 2025
d47c292
#6 deduplicating query results; logs exporter configurable
sebastiankruk Oct 20, 2025
459637c
#6 deduplication of test results for connector
sebastiankruk Oct 20, 2025
7b161eb
#6 delaying tests to get buffers cleaned
sebastiankruk Oct 20, 2025
69092e1
Merge branch 'dev/multi-events' into dev/plugin-tests-improved-and-al…
sebastiankruk Oct 21, 2025
c1a7d15
#6 fixing indents after merge
sebastiankruk Oct 21, 2025
34c4549
#6 aligning event tests
sebastiankruk Oct 21, 2025
1bf25cb
#6 extending tests for davis vs generic events
sebastiankruk Oct 21, 2025
cde6f33
#6 fixing events sdk based on tests
sebastiankruk Oct 21, 2025
76fdac9
#6 data[event.type] is no longer sent in bizevents
sebastiankruk Oct 21, 2025
c08bb0b
#6 we don't send data[event.type] in bizevents anymore
sebastiankruk Oct 21, 2025
67bb6dc
#6 names cleanup
sebastiankruk Oct 21, 2025
94ef0b2
#6 fixing details in sending events
sebastiankruk Oct 21, 2025
4882eaa
#6 improving how we handle _message
sebastiankruk Oct 21, 2025
4e01e63
#6 tests are green now
sebastiankruk Oct 21, 2025
14c204f
#6 cleaning tests
sebastiankruk Oct 21, 2025
49e1e76
#6 improving code quality
sebastiankruk Oct 21, 2025
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
100 changes: 100 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Build and Release

on:
push:
branches:
- main
- devel
tags:
- "v*"
workflow_dispatch:
inputs:
create_release:
description: "Create a draft release (for testing)"
required: false
type: boolean
default: false

jobs:
build-and-release:
name: Build and Release
runs-on: ubuntu-latest
permissions:
contents: write # Needed to create releases

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for git history access

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev pandoc
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Get Version
id: get_version
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
VERSION_NUMBER="${{ github.ref_name }}"
VERSION_NUMBER="${VERSION_NUMBER#v}"
else
VERSION_NUMBER=$(grep '^VERSION' src/dtagent/version.py | cut -d '"' -f 2)
if [[ -z "$VERSION_NUMBER" ]]; then
echo "Error: Failed to extract version from src/dtagent/version.py. File may be missing or format may be incorrect."
exit 1
fi
fi
echo "VERSION=${VERSION_NUMBER}" >> $GITHUB_OUTPUT

- name: Clean up previous build artifacts
run: |
rm -f dynatrace_snowflake_observability_agent-*.zip
rm -f Dynatrace-Snowflake-Observability-Agent-*.pdf

- name: Run package script
id: package
run: |
chmod +x *.sh
./package.sh full
BUILD_NUMBER=$(grep 'BUILD =' build/_version.py | awk '{print $3}')
echo "ZIP_NAME=dynatrace_snowflake_observability_agent-${{ steps.get_version.outputs.VERSION }}.${BUILD_NUMBER}.zip" >> $GITHUB_OUTPUT
echo "PDF_NAME=Dynatrace-Snowflake-Observability-Agent-${{ steps.get_version.outputs.VERSION }}.pdf" >> $GITHUB_OUTPUT

- name: Upload build artifacts
if: github.ref_type != 'tag' && inputs.create_release == false
uses: actions/upload-artifact@v4
with:
name: dsoa-package-${{ steps.get_version.outputs.VERSION }}
path: |
${{ steps.package.outputs.ZIP_NAME }}
${{ steps.package.outputs.PDF_NAME }}

- name: Extract Release Notes from CHANGELOG
id: extract_release_notes
if: github.ref_type == 'tag' || inputs.create_release == true
run: |
VERSION_HEADER="## Dynatrace Snowflake Observability Agent ${{ steps.get_version.outputs.VERSION }}"
# Use awk to find the section for the current version and print until the next ## heading
awk -v header="$VERSION_HEADER" '
$0 == header { in_section=1; next }
/^## / { if (in_section) exit }
in_section { print }
' CHANGELOG.md > release_notes.md

- name: Create GitHub Release
if: github.ref_type == 'tag' || inputs.create_release == true
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Dynatrace Snowflake Observability Agent ${{ steps.get_version.outputs.VERSION }}
body_path: release_notes.md
draft: ${{ inputs.create_release == true }}
files: |
${{ steps.package.outputs.ZIP_NAME }}
${{ steps.package.outputs.PDF_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ snowflake.local.yml
output/**
log.*
*.log
*credentials.json
*credentials*.json
*.pyc
build/*
package/*
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@
"dashboarding",
"DATEADD",
"deadsnakes",
"dedup",
"devel",
"docstrings",
"doesn't",
"dsoa",
"DTAGENT",
"Dynatrace",
"ECAC",
"ensurepath",
"externalbrowser",
Expand All @@ -61,6 +63,8 @@
"jsonstrip",
"judgements",
"Kamatchi",
"kvlist",
"LDATA",
"libcairo",
"libgdk",
"libpango",
Expand Down Expand Up @@ -98,6 +102,7 @@
"snowflakedb",
"snowpark",
"SNOWPIPE",
"softprops",
"specversion",
"spendings",
"SQLERRM",
Expand Down
62 changes: 58 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,65 @@ The build process for the Dynatrace Snowflake Observability Agent package involv

## Setting up development environment

You will need [Python 3.9](https://www.python.org/) or newer and [git](https://git-scm.com/).
If you are on Windows, you will need to install WSL2. Please refer to the `Prerequisites` in [the installation documentation](INSTALL.md) for more details.
This guide was created for developers who want to contribute to the Dynatrace Snowflake Observability Agent. If you only want to install and use the agent, please refer to the [INSTALL.md](INSTALL.md) guide.

The recommended setup is to use [VS Code](https://code.visualstudio.com/) with [Snowflake plugin](https://marketplace.visualstudio.com/items?itemName=snowflake.snowflake-vsc). Though neither of those are necessary, and any IDE that supports python and SQL should do.
On Windows, after installing WSL, it is necessary to open your IDE of choice using WSL (see [Setting up WSL on VS Code guide)](https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-vscode).
### Prerequisites

You will need the following software installed:

* [Python](https://www.python.org/) (3.9 or newer)
* [Git](https://git-scm.com/)
* On Windows, [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install) is required.

The recommended setup is to use [VS Code](https://code.visualstudio.com/) with the [Snowflake plugin](https://marketplace.visualstudio.com/items?itemName=snowflake.snowflake-vsc).

### Environment Setup

1. **Clone the repository:**

```bash
git clone https://github.com/dynatrace-oss/dynatrace-snowflake-observability-agent.git
cd dynatrace-snowflake-observability-agent
```

1. **Create and activate a virtual environment:**

```bash
python -m venv .venv
source .venv/bin/activate
```

1. **Install dependencies:**

The `setup.sh` script can help install most of the required tools.

```bash
./setup.sh
```

Alternatively, you can install them manually. You will need the dependencies for running the agent (see `INSTALL.md`) plus the development dependencies.

### System Dependencies

For **Ubuntu/Debian**:

```bash
sudo apt-get update
sudo apt-get install -y pango cairo gdk-pixbuf libffi pandoc
```

For **macOS** (using [Homebrew](https://brew.sh/)):

```bash
brew install pango cairo gdk-pixbuf libffi pandoc
```

Additional **Python packages** for all platforms are listed in `requirements.txt`.
Install them using pip:

```bash
pip install -r requirements.txt
```

## Building Dynatrace Snowflake Observability Agent

Expand Down
Loading
Loading