Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scale-tone/cosmos-db-demo
https://github.com/scale-tone/cosmos-db-demo
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/scale-tone/cosmos-db-demo
- Owner: scale-tone
- Created: 2024-11-13T17:40:32.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-18T09:13:56.000Z (about 2 months ago)
- Last Synced: 2024-11-18T10:27:05.558Z (about 2 months ago)
- Language: C#
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeFeedTest.cs
Awesome Lists containing this project
README
# cosmos-db-demo
A bunch of .NET code samples demonstrating best parts of Cosmos DB.
The code uses identity-based authentication when connecting to Cosmos DB, so you will need to explicitly give yourself permissions via e.g. Azure Powershell:
```
$accountName = "my-cosmos-db-account-name"
$resourceGroupName = "my-resource-group-name"
$principalId = "my-entra-id-user-object-id"New-AzCosmosDBSqlRoleAssignment `
-AccountName $accountName `
-ResourceGroupName $resourceGroupName `
-RoleDefinitionId "00000000-0000-0000-0000-000000000002" `
-Scope "/" `
-PrincipalId $principalId
```Instrumented with OpenTelemetry and Zipkin exporter, so to see the traces just run Zipkin:
```
curl -sSL https://zipkin.io/quickstart.sh | bash -s
java -jar zipkin.jar
```
along the way.