Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scale-tone/cosmos-db-demo


https://github.com/scale-tone/cosmos-db-demo

Last synced: about 1 month ago
JSON representation

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.